Fix more missing or incorrect feature test macros
authorJonathan Wakely <jwakely@redhat.com>
Tue, 15 Jan 2019 12:58:19 +0000 (12:58 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 15 Jan 2019 12:58:19 +0000 (12:58 +0000)
* include/bits/erase_if.h [__cplusplus > 201703L]
(__cpp_lib_erase_if): Only define for C++2a.
* include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
(__cpp_lib_null_iterators): Define.
* include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
(__cpp_lib_null_iterators): Define.
[__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.

From-SVN: r267937

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/erase_if.h
libstdc++-v3/include/std/iterator
libstdc++-v3/include/std/version

index dbb7d8e4b549dcad1efbde5d51e0c342834d087c..8ad9c2f29f85fac4a7dee1c358468d198d2344b2 100644 (file)
@@ -1,5 +1,13 @@
 2019-01-15  Jonathan Wakely  <jwakely@redhat.com>
 
+       * include/bits/erase_if.h [__cplusplus > 201703L]
+       (__cpp_lib_erase_if): Only define for C++2a.
+       * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
+       (__cpp_lib_null_iterators): Define.
+       * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
+       (__cpp_lib_null_iterators): Define.
+       [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
+
        * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
        status.
        * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
index d84f5ffc8ed9fba2768dfc0c877cdfea14a79831..4641dbebd8511e924a34b4846e2830c5a2a65466 100644 (file)
@@ -38,7 +38,9 @@ namespace std
 {
 _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
-#define __cpp_lib_erase_if 201900L
+#if __cplusplus > 201703L
+# define __cpp_lib_erase_if 201900L
+#endif
 
   namespace __detail
   {
index 5c6903c1cfffc3ba225d55fdb7ef674b452a2638..9d9e19c4c6bb67fe8eba1085d6e158d1ec2a3ae1 100644 (file)
@@ -67,4 +67,8 @@
 #include <bits/streambuf_iterator.h>
 #include <bits/range_access.h>
 
+#if __cplusplus >= 201402L && ! defined _GLIBCXX_DEBUG // PR libstdc++/70303
+# define __cpp_lib_null_iterators 201304L
+#endif
+
 #endif /* _GLIBCXX_ITERATOR */
index f49a45940f93b7d582e3c8ebdf732e8960398e8b..36d291dcf93ceb25ea6d663ba3b3d3944f293ceb 100644 (file)
 # define __cpp_lib_uncaught_exceptions 201411L
 #endif
 
+#if __cpp_impl_destroying_delete
+# define __cpp_lib_destroying_delete 201806L
+#endif
+
 #if __cplusplus >= 201103L
 // c++11
 #define __cpp_lib_allocator_is_always_equal 201411
@@ -71,6 +75,9 @@
 #define __cpp_lib_is_final 201402L
 #define __cpp_lib_make_reverse_iterator 201402
 #define __cpp_lib_make_unique 201304
+#ifndef _GLIBCXX_DEBUG // PR libstdc++/70303
+# define __cpp_lib_null_iterators 201304L
+#endif
 #define __cpp_lib_quoted_string_io 201304
 #define __cpp_lib_robust_nonmodifying_seq_ops 201304
 #ifdef _GLIBCXX_HAS_GTHREADS