]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix std::vector<bool> for -std=gnu++14 -fconcepts [PR116070]
authorJonathan Wakely <jwakely@redhat.com>
Wed, 24 Jul 2024 10:32:22 +0000 (11:32 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 24 Jul 2024 16:18:05 +0000 (17:18 +0100)
This questionable combination of flags causes a number of errors. This
one in std::vector<bool> needs to be fixed in the gcc-13 branch so I'm
committing it separately to simplify backporting.

libstdc++-v3/ChangeLog:

PR libstdc++/116070
* include/bits/stl_bvector.h: Check feature test macro before
using is_default_constructible_v.

libstdc++-v3/include/bits/stl_bvector.h

index 245e1c3b3a7745ad74c799efbabeb275748ba3e9..c45b7ff3320d48ad9519d91fd1e466fdfb812232 100644 (file)
@@ -593,7 +593,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        _GLIBCXX20_CONSTEXPR
        _Bvector_impl() _GLIBCXX_NOEXCEPT_IF(
          is_nothrow_default_constructible<_Bit_alloc_type>::value)
-#if __cpp_concepts
+#if __cpp_concepts && __glibcxx_type_trait_variable_templates
        requires is_default_constructible_v<_Bit_alloc_type>
 #endif
        : _Bit_alloc_type()