From 3fef9a98b92f052563b6fc423a641c040d73cb89 Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Wed, 27 Jul 2022 10:48:43 -0700 Subject: [PATCH 1/2] implement LWG-3701 Make `formatter, charT>` requirement explicit --- stl/inc/format | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stl/inc/format b/stl/inc/format index 3e89553d82..d72f1baea9 100644 --- a/stl/inc/format +++ b/stl/inc/format @@ -3336,6 +3336,9 @@ template <_Format_supported_charT _CharT> struct formatter : _Formatter_base {}; +template <_Format_supported_charT _CharT, size_t _Nx> +struct formatter<_CharT[_Nx], _CharT> : _Formatter_base<_CharT[_Nx], _CharT, _Basic_format_arg_type::_CString_type> {}; + template <_Format_supported_charT _CharT, size_t _Nx> struct formatter : _Formatter_base {}; From 9c31f4c82a14f2a91c11a09cc6c669439ad3e482 Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Wed, 27 Jul 2022 14:00:30 -0700 Subject: [PATCH 2/2] fix (unwritten) Casey comment --- stl/inc/format | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stl/inc/format b/stl/inc/format index d72f1baea9..585bf5e1fa 100644 --- a/stl/inc/format +++ b/stl/inc/format @@ -3341,7 +3341,7 @@ struct formatter<_CharT[_Nx], _CharT> : _Formatter_base<_CharT[_Nx], _CharT, _Ba template <_Format_supported_charT _CharT, size_t _Nx> struct formatter - : _Formatter_base {}; + : _Formatter_base<_CharT[_Nx], _CharT, _Basic_format_arg_type::_CString_type> {}; template <_Format_supported_charT _CharT, class _Traits, class _Allocator> struct formatter, _CharT>