Fix missing or incorrect feature test macros
authorJonathan Wakely <jwakely@redhat.com>
Tue, 15 Jan 2019 12:01:12 +0000 (12:01 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 15 Jan 2019 12:01:12 +0000 (12:01 +0000)
* doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
status.
* include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
Define.
* include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
changes are supported.
* include/std/optional (__cpp_lib_optional): Likewise.
* include/std/variant (__cpp_lib_variant): Likewise.
* include/std/version [!__STRICT_ANSI__]
(__cpp_lib_uncaught_exceptions): Define as long integer.
[__cplusplus >= 201703L] (__cpp_lib_any)
(__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
(__cpp_lib_variant): Define for C++17.
[__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
as long integer.
* libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
integer.

From-SVN: r267936

libstdc++-v3/ChangeLog
libstdc++-v3/doc/xml/manual/status_cxx2017.xml
libstdc++-v3/include/bits/stl_uninitialized.h
libstdc++-v3/include/std/any
libstdc++-v3/include/std/optional
libstdc++-v3/include/std/variant
libstdc++-v3/include/std/version
libstdc++-v3/libsupc++/exception

index 79c2c344edf326715c1095a6c331aff8b8d1194b..dbb7d8e4b549dcad1efbde5d51e0c342834d087c 100644 (file)
@@ -1,5 +1,23 @@
 2019-01-15  Jonathan Wakely  <jwakely@redhat.com>
 
+       * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
+       status.
+       * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
+       Define.
+       * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
+       changes are supported.
+       * include/std/optional (__cpp_lib_optional): Likewise.
+       * include/std/variant (__cpp_lib_variant): Likewise.
+       * include/std/version [!__STRICT_ANSI__]
+       (__cpp_lib_uncaught_exceptions): Define as long integer.
+       [__cplusplus >= 201703L] (__cpp_lib_any)
+       (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
+       (__cpp_lib_variant): Define for C++17.
+       [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
+       as long integer.
+       * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
+       integer.
+
        * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
 
 2019-01-12  Jonathan Wakely  <jwakely@redhat.com>
index 0af8a02b00f6f62121ee6cc9a244c68fc3490ff8..c9913a9e3a72a399b1f92b5c5afb025d14a43edb 100644 (file)
@@ -787,6 +787,31 @@ Feature-testing recommendations for C++</link>.
              <code> __cpp_lib_to_chars >= 201611 </code></entry>
     </row>
 
+    <row>
+      <entry> Homogeneous interface for variant, any and optional </entry>
+      <entry>
+       <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0032r3.pdf">
+       P0032R3
+       </link>
+      </entry>
+      <entry align="center"> 7.1  </entry>
+      <entry>
+             <code> __cpp_lib_any >= 201606 </code>,
+             <code> __cpp_lib_optional >= 201606 </code>,
+             <code> __cpp_lib_variant >= 201606 </code>
+      </entry>
+    </row>
+
+    <row>
+      <entry> Making Optional Greater Equal Again </entry>
+      <entry>
+       <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0307r2.pdf">
+       P0307R2
+       </link>
+      </entry>
+      <entry align="center"> 7.1  </entry>
+      <entry> <code> __cpp_lib_optional >= 201606 </code> </entry>
+    </row>
 
   </tbody>
 </tgroup>
index a0c574dfc44c1536d0a7fbd2b007609a70ac4e90..664e4ad8f002d45f92339bdb83a3ac9cf83967d6 100644 (file)
@@ -826,7 +826,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
 #endif
 
-#if __cplusplus > 201402L
+#if __cplusplus >= 201703L
+# define __cpp_lib_raw_memory_algorithms 201606L
+
   template <typename _ForwardIterator>
     inline void
     uninitialized_default_construct(_ForwardIterator __first,
@@ -877,7 +879,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
         __count, __result);
       return {__res.first.base(), __res.second};
     }
-#endif
+#endif // C++17
 
 #if __cplusplus >= 201103L
   template<typename _Tp, typename _Up, typename _Allocator>
index 59d207181cf97461e940f7a4a340e8a20b905f5b..385a99ce7441e28c645122610a40dc0e446a2945 100644 (file)
@@ -66,7 +66,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 #endif
   }
 
-#define __cpp_lib_any 201603
+#define __cpp_lib_any 201606L
 
   /**
    *  @brief A type-safe container of any type.
index c5e66bdd140c430f836f8a32e127d491edc03f75..d243930fed4906285a68b5c640e75f00da57ff07 100644 (file)
@@ -51,7 +51,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
    *  @{
    */
 
-#define __cpp_lib_optional 201603
+#define __cpp_lib_optional 201606L
 
   template<typename _Tp>
     class optional;
index 83cf99e9ae0097920f5f23c4f9a9b35d891c3a1a..89deb143097dfa66a33559b8025051f9846e33a6 100644 (file)
@@ -68,7 +68,7 @@ namespace __variant
 } // namespace __variant
 } // namespace __detail
 
-#define __cpp_lib_variant 201603
+#define __cpp_lib_variant 201606L
 
   template<typename... _Types> class tuple;
   template<typename... _Types> class variant;
index e9a1f1251af0927c7de19fbb674904cbc5f4d523..f49a45940f93b7d582e3c8ebdf732e8960398e8b 100644 (file)
@@ -39,7 +39,7 @@
 
 #if !defined(__STRICT_ANSI__)
 // gnu++03
-# define __cpp_lib_uncaught_exceptions 201411
+# define __cpp_lib_uncaught_exceptions 201411L
 #endif
 
 #if __cplusplus >= 201103L
@@ -85,6 +85,7 @@
 #if __cplusplus >= 201703L
 // c++17
 #define __cpp_lib_addressof_constexpr 201603
+#define __cpp_lib_any 201606L
 #define __cpp_lib_apply 201603
 #define __cpp_lib_array_constexpr 201603
 #define __cpp_lib_as_const 201510
 #define __cpp_lib_node_extract 201606
 #define __cpp_lib_nonmember_container_access 201411
 #define __cpp_lib_not_fn 201603
-#define __cpp_lib_optional 201603
+#define __cpp_lib_optional 201606L
+#define __cpp_lib_raw_memory_algorithms 201606L
 #define __cpp_lib_sample 201603
 #ifdef _GLIBCXX_HAS_GTHREADS
 # define __cpp_lib_scoped_lock 201703
 #define __cpp_lib_shared_ptr_weak_type 201606
 #define __cpp_lib_string_view 201603
 #define __cpp_lib_type_trait_variable_templates 201510L
+#define __cpp_lib_uncaught_exceptions 201411L
 #define __cpp_lib_unordered_map_insertion 201411
 #define __cpp_lib_unordered_map_try_emplace 201411
+#define __cpp_lib_variant 201606L
 #define __cpp_lib_void_t 201411
 
 #if __cplusplus > 201703L
index a90d38ee8e9f1336d4af9515a67c8a83b63a617a..073bfdda42d324213f61d52d5c80a194efa9a1e7 100644 (file)
@@ -101,8 +101,8 @@ namespace std
   _GLIBCXX17_DEPRECATED
   bool uncaught_exception() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));
 
-#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++17 or gnu++98
-#define __cpp_lib_uncaught_exceptions 201411
+#if __cplusplus >= 201703L || !defined(__STRICT_ANSI__) // c++17 or gnu++98
+#define __cpp_lib_uncaught_exceptions 201411L
   /// The number of uncaught exceptions.
   int uncaught_exceptions() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));
 #endif