From: Jonathan Wakely Date: Tue, 27 Sep 2016 15:39:51 +0000 (+0100) Subject: Define feature macro and update C++17 library status X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4940de303cccbba8b978355685b219db19ae8cde;p=gcc.git 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 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 417deb815d0..69ec081cd0c 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,10 @@ 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 3c589791b50..ecc93a947c7 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 4ead6b996c4..feed08514ce 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 c750a8374bc..8b2389c7250 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 1c7276207d9..53103598d09 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;