Where is the standard library defined, the defined "user-defined" letter "m"?

I came across the following example while looking at a C ++ Core Guidlines document :

Example

change_speed(double s);   // bad: what does s signify?
// ...
change_speed(2.3);

The best approach is to be explicit about the meaning of the double (new speed or delta at old speed?) And the unit used:

change_speed(Speed s);    // better: the meaning of s is specified
// ...
change_speed(2.3);        // error: no unit
change_speed(23m / 10s);  // meters per second

We could accept a simple (without a unit) double as a delta, but that would be a mistake.

As for this last line of code, on this particular page there was no mention of what this syntax meant, and it looked completely alien to me.

, , , , '' , , , , 's' , 'm'.

SO, , , , .

: "m" *?


< > * , .
>

+4

Source: https://habr.com/ru/post/1681919/


All Articles