[gcc r14-10529] libstdc++: Fix std::vector<bool> for -std=gnu++14 -fconcepts [PR116070]
Jonathan Wakely
redi@gcc.gnu.org
Thu Aug 1 17:54:39 GMT 2024
https://gcc.gnu.org/g:ce84abae497ec2617a2eb12f40815639235be97c
commit r14-10529-gce84abae497ec2617a2eb12f40815639235be97c
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed Jul 24 11:32:22 2024 +0100
libstdc++: Fix std::vector<bool> for -std=gnu++14 -fconcepts [PR116070]
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.
(cherry picked from commit 5fc9c40fea2481e56bf7bcc994cb40c71e28abb8)
Diff:
---
libstdc++-v3/include/bits/stl_bvector.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libstdc++-v3/include/bits/stl_bvector.h b/libstdc++-v3/include/bits/stl_bvector.h
index d567e26f4e43..4f1e7686a1c6 100644
--- a/libstdc++-v3/include/bits/stl_bvector.h
+++ b/libstdc++-v3/include/bits/stl_bvector.h
@@ -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()
More information about the Libstdc++-cvs
mailing list