@@ -5799,67 +5799,69 @@ private:
57995799 _CHRONO _Chrono_formatter<_CharT> _Impl;
58005800};
58015801
5802- template <class _Rep, class _Period, class _CharT>
5802+ // Per LWG-3997, the _CharT template parameter is constrained to supported character types.
5803+
5804+ template <class _Rep, class _Period, _Format_supported_charT _CharT>
58035805struct formatter<_CHRONO duration<_Rep, _Period>, _CharT>
58045806 : _Fill_tm_formatter<_CHRONO duration<_Rep, _Period>, _CharT> {};
58055807
5806- template <class _CharT>
5808+ template <_Format_supported_charT _CharT>
58075809struct formatter<_CHRONO day, _CharT> : _Fill_tm_formatter<_CHRONO day, _CharT> {};
58085810
5809- template <class _CharT>
5811+ template <_Format_supported_charT _CharT>
58105812struct formatter<_CHRONO month, _CharT> : _Fill_tm_formatter<_CHRONO month, _CharT> {};
58115813
5812- template <class _CharT>
5814+ template <_Format_supported_charT _CharT>
58135815struct formatter<_CHRONO year, _CharT> : _Fill_tm_formatter<_CHRONO year, _CharT> {};
58145816
5815- template <class _CharT>
5817+ template <_Format_supported_charT _CharT>
58165818struct formatter<_CHRONO weekday, _CharT> : _Fill_tm_formatter<_CHRONO weekday, _CharT> {};
58175819
5818- template <class _CharT>
5820+ template <_Format_supported_charT _CharT>
58195821struct formatter<_CHRONO weekday_indexed, _CharT> : _Fill_tm_formatter<_CHRONO weekday_indexed, _CharT> {};
58205822
5821- template <class _CharT>
5823+ template <_Format_supported_charT _CharT>
58225824struct formatter<_CHRONO weekday_last, _CharT> : _Fill_tm_formatter<_CHRONO weekday_last, _CharT> {};
58235825
5824- template <class _CharT>
5826+ template <_Format_supported_charT _CharT>
58255827struct formatter<_CHRONO month_day, _CharT> : _Fill_tm_formatter<_CHRONO month_day, _CharT> {};
58265828
5827- template <class _CharT>
5829+ template <_Format_supported_charT _CharT>
58285830struct formatter<_CHRONO month_day_last, _CharT> : _Fill_tm_formatter<_CHRONO month_day_last, _CharT> {};
58295831
5830- template <class _CharT>
5832+ template <_Format_supported_charT _CharT>
58315833struct formatter<_CHRONO month_weekday, _CharT> : _Fill_tm_formatter<_CHRONO month_weekday, _CharT> {};
58325834
5833- template <class _CharT>
5835+ template <_Format_supported_charT _CharT>
58345836struct formatter<_CHRONO month_weekday_last, _CharT> : _Fill_tm_formatter<_CHRONO month_weekday_last, _CharT> {};
58355837
5836- template <class _CharT>
5838+ template <_Format_supported_charT _CharT>
58375839struct formatter<_CHRONO year_month, _CharT> : _Fill_tm_formatter<_CHRONO year_month, _CharT> {};
58385840
5839- template <class _CharT>
5841+ template <_Format_supported_charT _CharT>
58405842struct formatter<_CHRONO year_month_day, _CharT> : _Fill_tm_formatter<_CHRONO year_month_day, _CharT> {};
58415843
5842- template <class _CharT>
5844+ template <_Format_supported_charT _CharT>
58435845struct formatter<_CHRONO year_month_day_last, _CharT> : _Fill_tm_formatter<_CHRONO year_month_day_last, _CharT> {};
58445846
5845- template <class _CharT>
5847+ template <_Format_supported_charT _CharT>
58465848struct formatter<_CHRONO year_month_weekday, _CharT> : _Fill_tm_formatter<_CHRONO year_month_weekday, _CharT> {};
58475849
5848- template <class _CharT>
5850+ template <_Format_supported_charT _CharT>
58495851struct formatter<_CHRONO year_month_weekday_last, _CharT>
58505852 : _Fill_tm_formatter<_CHRONO year_month_weekday_last, _CharT> {};
58515853
5852- template <class _Rep, class _Period, class _CharT>
5854+ template <class _Rep, class _Period, _Format_supported_charT _CharT>
58535855struct formatter<_CHRONO hh_mm_ss<_CHRONO duration<_Rep, _Period>>, _CharT>
58545856 : _Fill_tm_formatter<_CHRONO hh_mm_ss<_CHRONO duration<_Rep, _Period>>, _CharT> {};
58555857
5856- template <class _CharT>
5858+ template <_Format_supported_charT _CharT>
58575859struct formatter<_CHRONO sys_info, _CharT> : _Fill_tm_formatter<_CHRONO sys_info, _CharT> {};
58585860
5859- template <class _CharT>
5861+ template <_Format_supported_charT _CharT>
58605862struct formatter<_CHRONO local_info, _CharT> : _Fill_tm_formatter<_CHRONO local_info, _CharT> {};
58615863
5862- template <class _Duration, class _CharT>
5864+ template <class _Duration, _Format_supported_charT _CharT>
58635865struct formatter<_CHRONO sys_time<_Duration>, _CharT> {
58645866 constexpr auto parse(basic_format_parse_context<_CharT>& _Parse_ctx) {
58655867 return _Impl.template _Parse<_CHRONO sys_time<_Duration>>(_Parse_ctx);
@@ -5874,7 +5876,7 @@ private:
58745876 _CHRONO _Chrono_formatter<_CharT> _Impl{_STATICALLY_WIDEN(_CharT, "UTC")};
58755877};
58765878
5877- template <class _Duration, class _CharT>
5879+ template <class _Duration, _Format_supported_charT _CharT>
58785880struct formatter<_CHRONO utc_time<_Duration>, _CharT> {
58795881 constexpr auto parse(basic_format_parse_context<_CharT>& _Parse_ctx) {
58805882 return _Impl.template _Parse<_CHRONO utc_time<_Duration>>(_Parse_ctx);
@@ -5890,7 +5892,7 @@ private:
58905892 _CHRONO _Chrono_formatter<_CharT> _Impl{_STATICALLY_WIDEN(_CharT, "UTC")};
58915893};
58925894
5893- template <class _Duration, class _CharT>
5895+ template <class _Duration, _Format_supported_charT _CharT>
58945896struct formatter<_CHRONO tai_time<_Duration>, _CharT> {
58955897 constexpr auto parse(basic_format_parse_context<_CharT>& _Parse_ctx) {
58965898 return _Impl.template _Parse<_CHRONO tai_time<_Duration>>(_Parse_ctx);
@@ -5909,7 +5911,7 @@ private:
59095911 _CHRONO _Chrono_formatter<_CharT> _Impl{_STATICALLY_WIDEN(_CharT, "TAI")};
59105912};
59115913
5912- template <class _Duration, class _CharT>
5914+ template <class _Duration, _Format_supported_charT _CharT>
59135915struct formatter<_CHRONO gps_time<_Duration>, _CharT> {
59145916 constexpr auto parse(basic_format_parse_context<_CharT>& _Parse_ctx) {
59155917 return _Impl.template _Parse<_CHRONO gps_time<_Duration>>(_Parse_ctx);
@@ -5928,7 +5930,7 @@ private:
59285930 _CHRONO _Chrono_formatter<_CharT> _Impl{_STATICALLY_WIDEN(_CharT, "GPS")};
59295931};
59305932
5931- template <class _Duration, class _CharT>
5933+ template <class _Duration, _Format_supported_charT _CharT>
59325934struct formatter<_CHRONO file_time<_Duration>, _CharT> {
59335935 constexpr auto parse(basic_format_parse_context<_CharT>& _Parse_ctx) {
59345936 return _Impl.template _Parse<_CHRONO file_time<_Duration>>(_Parse_ctx);
@@ -5945,14 +5947,14 @@ private:
59455947 _CHRONO _Chrono_formatter<_CharT> _Impl{_STATICALLY_WIDEN(_CharT, "UTC")};
59465948};
59475949
5948- template <class _Duration, class _CharT>
5950+ template <class _Duration, _Format_supported_charT _CharT>
59495951struct formatter<_CHRONO local_time<_Duration>, _CharT> : _Fill_tm_formatter<_CHRONO local_time<_Duration>, _CharT> {};
59505952
5951- template <class _Duration, class _CharT>
5953+ template <class _Duration, _Format_supported_charT _CharT>
59525954struct formatter<_CHRONO _Local_time_format_t<_Duration>, _CharT>
59535955 : _Fill_tm_formatter<_CHRONO _Local_time_format_t<_Duration>, _CharT> {};
59545956
5955- template <class _Duration, class _TimeZonePtr, class _CharT>
5957+ template <class _Duration, class _TimeZonePtr, _Format_supported_charT _CharT>
59565958struct formatter<_CHRONO zoned_time<_Duration, _TimeZonePtr>, _CharT>
59575959 : formatter<_CHRONO _Local_time_format_t<_Duration>, _CharT> {
59585960
0 commit comments