]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/include/bits/stl_set.h
Enforce allocator::value_type consistency for containers in C++2a
[thirdparty/gcc.git] / libstdc++-v3 / include / bits / stl_set.h
index 3131a7974b0bcb55fb149c9044d9f81ff883be39..279b9705d7881565e1ff828960251663da489638 100644 (file)
@@ -107,7 +107,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
 #if __cplusplus >= 201103L
       static_assert(is_same<typename remove_cv<_Key>::type, _Key>::value,
          "std::set must have a non-const, non-volatile value_type");
-# ifdef __STRICT_ANSI__
+# if __cplusplus > 201703L || defined __STRICT_ANSI__
       static_assert(is_same<typename _Alloc::value_type, _Key>::value,
          "std::set must have the same value_type as its allocator");
 # endif