diff --git a/include/fmt/core.h b/include/fmt/core.h index c946e12a..95f2eef2 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -2769,6 +2769,15 @@ FMT_CONSTEXPR auto parse_float_type_spec(const basic_format_specs& specs, case presentation_type::hexfloat_lower: result.format = float_format::hex; break; + case presentation_type::dec: + case presentation_type::oct: + case presentation_type::hex_lower: + case presentation_type::hex_upper: + case presentation_type::bin_lower: + case presentation_type::bin_upper: + case presentation_type::chr: + case presentation_type::string: + case presentation_type::pointer: default: eh.on_error("invalid type specifier"); break; diff --git a/include/fmt/format.h b/include/fmt/format.h index 1a5ff230..f57427ab 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1621,6 +1621,16 @@ FMT_CONSTEXPR FMT_INLINE auto write_int(OutputIt out, write_int_arg arg, } case presentation_type::chr: return write_char(out, static_cast(abs_value), specs); + case presentation_type::hexfloat_lower: + case presentation_type::hexfloat_upper: + case presentation_type::exp_lower: + case presentation_type::exp_upper: + case presentation_type::fixed_lower: + case presentation_type::fixed_upper: + case presentation_type::general_lower: + case presentation_type::general_upper: + case presentation_type::string: + case presentation_type::pointer: default: throw_format_error("invalid type specifier"); }