diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2024-09-20 17:26:35 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2024-09-22 17:52:36 +0100 |
commit | 0f52a92ab249bde64b7570d4cf549437a3283520 (patch) | |
tree | b128beac89a80ad8424237c8e7d90aa0a87443a5 /gcc/gimple-iterator.h | |
parent | 83c6fe130a00c6c28cfffcc787a0a719966adfaf (diff) | |
download | gcc-0f52a92ab249bde64b7570d4cf549437a3283520.zip gcc-0f52a92ab249bde64b7570d4cf549437a3283520.tar.gz gcc-0f52a92ab249bde64b7570d4cf549437a3283520.tar.bz2 |
libstdc++: Disable std::formatter<char8_t, C> specialization
I noticed that char8_t was missing from the list of types that were
prevented from using the std::formatter partial specialization for
integer types. That partial specialization was also matching
cv-qualified integer types, because std::integral<const int> is true.
This change simplifies the constraints by introducing a new variable
template which is only true for cv-unqualified integer types, with
explicit specializations to exclude the character types. This should be
slightly more efficient than the previous constraints that checked
std::integral<T> and (!__is_one_of<T, char, wchar_t, ...>). It also
avoids the need for a separate std::formatter specialization for 128-bit
integers, as they can be handled by the new variable template too.
libstdc++-v3/ChangeLog:
* include/std/format (__format::__is_formattable_integer): New
variable template and specializations.
(template<integral, __char> struct formatter): Replace
constraints on first arg with __is_formattable_integer.
* testsuite/std/format/formatter/requirements.cc: Check that
std::formatter specializations for char8_t and const int are
disabled.
Diffstat (limited to 'gcc/gimple-iterator.h')
0 files changed, 0 insertions, 0 deletions