From 4940de303cccbba8b978355685b219db19ae8cde Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 27 Sep 2016 16:39:51 +0100 Subject: [PATCH] Define feature macro and update C++17 library status * doc/xml/manual/status_cxx2017.xml: Update status. * doc/html/*: Regenerate. * include/std/functional (__cpp_lib_boyer_moore_searcher): Define. * testsuite/20_util/function_objects/searchers.cc: Test feature macro. From-SVN: r240550 --- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/doc/html/manual/status.html | 16 ++++++++-------- libstdc++-v3/doc/xml/manual/status_cxx2017.xml | 12 ++++-------- libstdc++-v3/include/std/functional | 1 + .../testsuite/20_util/function_objects/searchers.cc | 6 ++++++ 5 files changed, 24 insertions(+), 16 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 417deb8..69ec081 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,6 +1,11 @@ 2016-09-27 Jonathan Wakely * doc/xml/manual/status_cxx2017.xml: Update status. + * doc/html/*: Regenerate. + * include/std/functional (__cpp_lib_boyer_moore_searcher): Define. + * testsuite/20_util/function_objects/searchers.cc: Test feature macro. + + * doc/xml/manual/status_cxx2017.xml: Update status. * include/c_global/cmath (hypot): Add three-dimensional overloads. * testsuite/26_numerics/headers/cmath/hypot.cc: New. diff --git a/libstdc++-v3/doc/html/manual/status.html b/libstdc++-v3/doc/html/manual/status.html index 3c58979..ecc93a9 100644 --- a/libstdc++-v3/doc/html/manual/status.html +++ b/libstdc++-v3/doc/html/manual/status.html @@ -523,11 +523,11 @@ Feature-testing recommendations for C++. P0220R1 - No __cpp_lib_shared_ptr_arrays >= 201603 Library Fundamentals V1 TS Components: Searchers + No __cpp_lib_shared_ptr_arrays >= 201603 Library Fundamentals V1 TS Components: Searchers P0220R1 - No __cpp_lib_boyer_moore_searcher >= 201603 Constant View: A proposal for a std::as_const helper function template + 7 __cpp_lib_boyer_moore_searcher >= 201603 Constant View: A proposal for a std::as_const helper function template P0007R1 @@ -582,19 +582,19 @@ Feature-testing recommendations for C++. P0005R4 - 7 __cpp_lib_not_fn >= 201603 Fixes for not_fn + 7 __cpp_lib_not_fn >= 201603 Fixes for not_fn P0358R1 - No   Fixing a design mistake in the searchers interface in Library Fundamentals + 7   Fixing a design mistake in the searchers interface in Library Fundamentals P0253R1 - No   Extending memory management tools + 7   Extending memory management tools P0040R3 - No shared_ptr::weak_type + 7 shared_ptr::weak_type P0163R0 @@ -693,11 +693,11 @@ Feature-testing recommendations for C++. No __cpp_lib_gcd >= 201606 , __cpp_lib_lcm >= 201606 - Proposal to Introduce a 3-Argument Overload to std::hypot + Proposal to Introduce a 3-Argument Overload to std::hypot P0030R1 - No __cpp_lib_hypot >= 201603 Mathematical Special Functions for C++17 + 7 __cpp_lib_hypot >= 201603 Mathematical Special Functions for C++17 P0226R1 diff --git a/libstdc++-v3/doc/xml/manual/status_cxx2017.xml b/libstdc++-v3/doc/xml/manual/status_cxx2017.xml index 4ead6b9..feed085 100644 --- a/libstdc++-v3/doc/xml/manual/status_cxx2017.xml +++ b/libstdc++-v3/doc/xml/manual/status_cxx2017.xml @@ -171,14 +171,13 @@ Feature-testing recommendations for C++. - Library Fundamentals V1 TS Components: Searchers P0220R1 - No + 7 __cpp_lib_boyer_moore_searcher >= 201603 @@ -332,38 +331,35 @@ Feature-testing recommendations for C++. - Fixes for not_fn P0358R1 - No + 7 - Fixing a design mistake in the searchers interface in Library Fundamentals P0253R1 - No + 7 - Extending memory management tools P0040R3 - No + 7 diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional index c750a83..8b2389c 100644 --- a/libstdc++-v3/include/std/functional +++ b/libstdc++-v3/include/std/functional @@ -2206,6 +2206,7 @@ _GLIBCXX_MEM_FN_TRAITS(&&, false_type, true_type) } // Searchers +#define __cpp_lib_boyer_moore_searcher 201603 template> class default_searcher diff --git a/libstdc++-v3/testsuite/20_util/function_objects/searchers.cc b/libstdc++-v3/testsuite/20_util/function_objects/searchers.cc index 1c72762..5310359 100644 --- a/libstdc++-v3/testsuite/20_util/function_objects/searchers.cc +++ b/libstdc++-v3/testsuite/20_util/function_objects/searchers.cc @@ -25,6 +25,12 @@ #include #include +#ifndef __cpp_lib_boyer_moore_searcher +# error "Feature-test macro for searchers missing" +#elif __cpp_lib_boyer_moore_searcher < 201603 +# error "Feature-test macro for searchers has wrong value" +#endif + using std::make_default_searcher; using std::make_boyer_moore_searcher; using std::make_boyer_moore_horspool_searcher; -- 2.7.4