summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2016-08-03 16:42:31 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2016-08-03 16:42:31 +0000
commitb3f70025e3cec069bc6d06ba6a23bcc74f40aabd (patch)
tree48976560a379291dc6497c65b59eb4cd04e35ca4
parent45ff893b5f0124418796b57c650aa0f248200a29 (diff)
downloadgcc-b3f70025e3cec069bc6d06ba6a23bcc74f40aabd.tar.gz
Define __cpp_lib_generic_associative_lookup feature-test macro
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239084 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/include/bits/stl_function.h1
-rw-r--r--libstdc++-v3/include/bits/stl_tree.h4
-rw-r--r--libstdc++-v3/testsuite/experimental/feat-cxx14.cc24
4 files changed, 28 insertions, 6 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index d6082300e32..0dad50cf46b 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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.
diff --git a/libstdc++-v3/include/bits/stl_function.h b/libstdc++-v3/include/bits/stl_function.h
index eabf9baea53..68f39ff2690 100644
--- a/libstdc++-v3/include/bits/stl_function.h
+++ b/libstdc++-v3/include/bits/stl_function.h
@@ -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>
diff --git a/libstdc++-v3/include/bits/stl_tree.h b/libstdc++-v3/include/bits/stl_tree.h
index 7a9a4a6c277..8697a711a5f 100644
--- a/libstdc++-v3/include/bits/stl_tree.h
+++ b/libstdc++-v3/include/bits/stl_tree.h
@@ -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,
diff --git a/libstdc++-v3/testsuite/experimental/feat-cxx14.cc b/libstdc++-v3/testsuite/experimental/feat-cxx14.cc
index 2cc31ca03be..42b633f6ef6 100644
--- a/libstdc++-v3/testsuite/experimental/feat-cxx14.cc
+++ b/libstdc++-v3/testsuite/experimental/feat-cxx14.cc
@@ -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"
@@ -78,11 +80,11 @@
# 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"
@@ -119,3 +121,15 @@
#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