Skip to content
Snippets Groups Projects
  • Jonathan Wakely's avatar
    52de6aa1
    libstdc++: Fix std::format("{}", 'c') · 52de6aa1
    Jonathan Wakely authored
    When I added a fast path for std::format("{}", x) in
    r14-5587-g41a5ea4cab2c59 I forgot to handle char separately from other
    integral types. That caused std::format("{}", 'c') to return "99"
    instead of "c".
    
    libstdc++-v3/ChangeLog:
    
    	* include/std/format (__do_vformat_to): Handle char separately
    	from other integral types.
    	* testsuite/std/format/functions/format.cc: Check for expected
    	output for char and bool arguments.
    	* testsuite/std/format/string.cc: Check that 0 filling is
    	rejected for character and string formats.
    52de6aa1
    History
    libstdc++: Fix std::format("{}", 'c')
    Jonathan Wakely authored
    When I added a fast path for std::format("{}", x) in
    r14-5587-g41a5ea4cab2c59 I forgot to handle char separately from other
    integral types. That caused std::format("{}", 'c') to return "99"
    instead of "c".
    
    libstdc++-v3/ChangeLog:
    
    	* include/std/format (__do_vformat_to): Handle char separately
    	from other integral types.
    	* testsuite/std/format/functions/format.cc: Check for expected
    	output for char and bool arguments.
    	* testsuite/std/format/string.cc: Check that 0 filling is
    	rejected for character and string formats.