Prerequisite
char is signed
Description
Using fmt::format("{:c}", int{-104})") ends up with overflowing instead of casting to char.
repro on godbolt.
Expected Behavior:
c: Copies the character static_cast(value) to the output, where CharT is the character type of the format string. Throws std::format_error if value is not in the range of representable values for CharT (cppref).
Prerequisite
char is signed
Description
Using
fmt::format("{:c}", int{-104})")ends up with overflowing instead of casting to char.repro on godbolt.
Expected Behavior:
c: Copies the character static_cast(value) to the output, where CharT is the character type of the format string. Throws std::format_error if value is not in the range of representable values for CharT (cppref).