Define __cpp_lib_generic_associative_lookup feature-test macro
authorJonathan Wakely <jwakely@redhat.com>
Wed, 3 Aug 2016 16:42:31 +0000 (17:42 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 3 Aug 2016 16:42:31 +0000 (17:42 +0100)
* include/bits/stl_function.h: Remove commented-out macro.
* include/bits/stl_tree.h (__cpp_lib_generic_associative_lookup):
Define feature-test macro.
* testsuite/experimental/feat-cxx14.cc: Add tests for more macros.

From-SVN: r239084

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_function.h
libstdc++-v3/include/bits/stl_tree.h
libstdc++-v3/testsuite/experimental/feat-cxx14.cc

index d6082300e32dd01775db2f61eafd15aa482f6b18..0dad50cf46b3237a3f83523d64b84259b03b2ee1 100644 (file)
@@ -1,5 +1,10 @@
 2016-08-03  Jonathan Wakely  <jwakely@redhat.com>
 
+       * include/bits/stl_function.h: Remove commented-out macro.
+       * include/bits/stl_tree.h (__cpp_lib_generic_associative_lookup):
+       Define feature-test macro.
+       * testsuite/experimental/feat-cxx14.cc: Add tests for more macros.
+
        * include/bits/c++config (_GLIBCXX_USE_STD_SPEC_FUNCS): Define for
        C++17, or for C++11/C++14 when __STDCPP_WANT_MATH_SPEC_FUNCS__ is
        true.
index eabf9baea538fefef62d61a1f4c6949945228c5c..68f39ff2690b7e0a3e416d87f4283e261e2b6c95 100644 (file)
@@ -225,7 +225,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 #if __cplusplus > 201103L
 
 #define __cpp_lib_transparent_operators 201210
-//#define __cpp_lib_generic_associative_lookup 201304
 
   template<>
     struct plus<void>
index 7a9a4a6c277f214e415a7bcb46b032c522b3a5bd..8697a711a5f5c367b471193677d7de0d59f46b99 100644 (file)
@@ -73,6 +73,10 @@ namespace std _GLIBCXX_VISIBILITY(default)
 {
 _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
+#if __cplusplus > 201103L
+# define __cpp_lib_generic_associative_lookup 201304
+#endif
+
   // Red-black tree class, designed for use in implementing STL
   // associative containers (set, multiset, map, and multimap). The
   // insertion and deletion algorithms are based on those in Cormen,
index 2cc31ca03be030c06af9c30cb8484459706439dd..42b633f6ef6d6af47bb355400298e7330745ff28 100644 (file)
@@ -11,6 +11,8 @@
 #include <complex>
 #include <iomanip>
 #include <shared_mutex>
+#include <map>
+#include <set>
 
 #ifndef  __cpp_lib_integer_sequence
 #  error "__cpp_lib_integer_sequence"
 #  error "__cpp_lib_complex_udls != 201309"
 #endif
 
-//#ifndef  __cpp_lib_generic_associative_lookup
-//#  error "__cpp_lib_generic_associative_lookup"
-//#elif  __cpp_lib_generic_associative_lookup != 201304
-//#  error "__cpp_lib_generic_associative_lookup != 201304"
-//#endif
+#ifndef  __cpp_lib_generic_associative_lookup
+#  error "__cpp_lib_generic_associative_lookup"
+#elif  __cpp_lib_generic_associative_lookup != 201304
+#  error "__cpp_lib_generic_associative_lookup != 201304"
+#endif
 
 //#ifndef  __cpp_lib_null_iterators
 //#  error "__cpp_lib_null_iterators"
 #elif  __cpp_lib_is_final != 201402
 #  error "__cpp_lib_is_final != 201402"
 #endif
+
+#ifndef  __cpp_lib_is_null_pointer
+#  error "__cpp_lib_is_null_pointer"
+#elif  __cpp_lib_is_null_pointer != 201309
+#  error "__cpp_lib_is_null_pointer != 201309"
+#endif
+
+#ifndef  __cpp_lib_make_reverse_iterator
+#  error "__cpp_lib_make_reverse_iterator"
+#elif  __cpp_lib_make_reverse_iterator != 201402
+#  error "__cpp_lib_make_reverse_iterator != 201402"
+#endif