22 General utilities library [utilities]

22.14 Formatting [format]

22.14.2 Format string [format.string]

22.14.2.2 Standard format specifiers [format.string.std]

Table 66: Meaning of sign options [tab:format.sign]
Option
Meaning
+
Indicates that a sign should be used for both non-negative and negative numbers.
The + sign is inserted before the output of to_chars for non-negative numbers other than negative zero.
[Note 5: 
For negative numbers and negative zero the output of to_chars will already contain the sign so no additional transformation is performed.
— end note]
-
Indicates that a sign should be used for negative numbers and negative zero only (this is the default behavior).
space
Indicates that a leading space should be used for non-negative numbers other than negative zero, and a minus sign for negative numbers and negative zero.