mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-02 11:00:37 +08:00
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
This commit is contained in:
parent
fdb1849a6c
commit
ffef1e30a7
@ -1,3 +1,8 @@
|
||||
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>
|
||||
|
||||
Rename variables and cleanup comments.
|
||||
|
@ -118,9 +118,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
|
||||
__glibcxx_class_requires2(value_type, _Alloc_value_type, _SameTypeConcept)
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
#if __cplusplus > 201703L || defined __STRICT_ANSI__
|
||||
static_assert(is_same<typename _Alloc::value_type, value_type>::value,
|
||||
"std::map must have the same value_type as its allocator");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
@ -117,9 +117,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
|
||||
__glibcxx_class_requires2(value_type, _Alloc_value_type, _SameTypeConcept)
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
#if __cplusplus > 201703L || defined __STRICT_ANSI__
|
||||
static_assert(is_same<typename _Alloc::value_type, value_type>::value,
|
||||
"std::multimap must have the same value_type as its allocator");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user