[tab:format.type.int]

to_chars(first, last, value, 2); the base prefix is 0b.

The same as b, except that the base prefix is 0B.

Copies the character static_cast<charT>(value) to the output.

Throws format_error if value is not in the range of representable values for charT.

to_chars(first, last, value).

to_chars(first, last, value, 8); the base prefix is 0 if value is nonzero and is empty otherwise.

to_chars(first, last, value, 16); the base prefix is 0x.

The same as x, except that it uses uppercase letters for digits above 9 and the base prefix is 0X.

The same as d.

[Note 8:

If the formatting argument type is charT or bool, the default is instead c or s, respectively.

— end note]