From: Jonathan Wakely Date: Sat, 12 Jul 2025 12:09:03 +0000 (+0100) Subject: libstdc++: Constrain __gnu_debug::bitset(const CharT*) constructor [PR121046] X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f534db54a65b42638c08275338423063fe836f31;p=thirdparty%2Fgcc.git libstdc++: Constrain __gnu_debug::bitset(const CharT*) constructor [PR121046] The r16-3435-gbbc0e70b610f19 change (for LWG 4294) needs to be applied to the debug mode __gnu_debug::bitset as well as the normal one. libstdc++-v3/ChangeLog: PR libstdc++/121046 * include/debug/bitset (bitset(const CharT*, ...)): Add constraints on CharT type. --- diff --git a/libstdc++-v3/include/debug/bitset b/libstdc++-v3/include/debug/bitset index e4d3e6619c9..2f4bab84639 100644 --- a/libstdc++-v3/include/debug/bitset +++ b/libstdc++-v3/include/debug/bitset @@ -179,7 +179,13 @@ namespace __debug bitset(const _Base& __x) : _Base(__x) { } #if __cplusplus >= 201103L - template + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 4294. bitset(const CharT*) constructor needs to be constrained + template, + is_standard_layout<_CharT>, + is_trivially_default_constructible<_CharT>, + __not_>>> _GLIBCXX23_CONSTEXPR explicit bitset(const _CharT* __str,