Commit ffef1e30 by Jonathan Wakely Committed by Jonathan Wakely

Fix uses of static_assert not guarded by C++11 check

	* include/bits/stl_map.h (map): Disable static assert for C++98 mode.
	* include/bits/stl_multimap.h (multimap): Likewise.

From-SVN: r271884
parent fdb1849a
2019-06-03 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_map.h (map): Disable static assert for C++98 mode.
* include/bits/stl_multimap.h (multimap): Likewise.
2019-06-03 François Dumont <fdumont@gcc.gnu.org> 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
Rename variables and cleanup comments. Rename variables and cleanup comments.
......
...@@ -118,10 +118,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER ...@@ -118,10 +118,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
__glibcxx_class_requires2(value_type, _Alloc_value_type, _SameTypeConcept) __glibcxx_class_requires2(value_type, _Alloc_value_type, _SameTypeConcept)
#endif #endif
#if __cplusplus >= 201103L
#if __cplusplus > 201703L || defined __STRICT_ANSI__ #if __cplusplus > 201703L || defined __STRICT_ANSI__
static_assert(is_same<typename _Alloc::value_type, value_type>::value, static_assert(is_same<typename _Alloc::value_type, value_type>::value,
"std::map must have the same value_type as its allocator"); "std::map must have the same value_type as its allocator");
#endif #endif
#endif
public: public:
class value_compare class value_compare
......
...@@ -117,10 +117,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER ...@@ -117,10 +117,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
__glibcxx_class_requires2(value_type, _Alloc_value_type, _SameTypeConcept) __glibcxx_class_requires2(value_type, _Alloc_value_type, _SameTypeConcept)
#endif #endif
#if __cplusplus >= 201103L
#if __cplusplus > 201703L || defined __STRICT_ANSI__ #if __cplusplus > 201703L || defined __STRICT_ANSI__
static_assert(is_same<typename _Alloc::value_type, value_type>::value, static_assert(is_same<typename _Alloc::value_type, value_type>::value,
"std::multimap must have the same value_type as its allocator"); "std::multimap must have the same value_type as its allocator");
#endif #endif
#endif
public: public:
class value_compare class value_compare
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment