diff mbox series

[committed,1/2] libstdc++: Fix std::vector<bool> for -std=gnu++14 -fconcepts [PR116070]

Message ID 20240724162133.3934124-1-jwakely@redhat.com
State New
Headers show
Series [committed,1/2] libstdc++: Fix std::vector<bool> for -std=gnu++14 -fconcepts [PR116070] | expand

Commit Message

Jonathan Wakely July 24, 2024, 4:20 p.m. UTC
Tested x86_64-linux.

Pushed to trunk. Backports to follow after the 14.2 release.

-- >8 --

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libstdc++-v3/include/bits/stl_bvector.h b/libstdc++-v3/include/bits/stl_bvector.h
index 245e1c3b3a7..c45b7ff3320 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()