This adds the missing feature macro for the searchers and updates the
docs.

        * 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.

Tested powerpc64le-linux, committed to trunk.

commit 5344a11cabf9231dec18db2882034e55e5658b8f
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Tue Sep 27 16:25:22 2016 +0100

    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.

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++</link>.
     </row>
 
     <row>
-      <?dbhtml bgcolor="#C8B0B0" ?>
       <entry> Library Fundamentals V1 TS Components: Searchers </entry>
       <entry>
        <link xmlns:xlink="http://www.w3.org/1999/xlink"; 
xlink:href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0220r1.html";>
        P0220R1
        </link>
       </entry>
-      <entry align="center"> No </entry>
+      <entry align="center"> 7 </entry>
       <entry> <code>__cpp_lib_boyer_moore_searcher >= 201603</code> </entry>
     </row>
 
@@ -332,38 +331,35 @@ Feature-testing recommendations for C++</link>.
     </row>
 
     <row>
-      <?dbhtml bgcolor="#C8B0B0" ?>
       <entry> Fixes for <code>not_fn</code> </entry>
       <entry>
        <link xmlns:xlink="http://www.w3.org/1999/xlink"; 
xlink:href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0358r1.html";>
        P0358R1
        </link>
       </entry>
-      <entry align="center"> No </entry>
+      <entry align="center"> 7 </entry>
       <entry/>
     </row>
 
     <row>
-      <?dbhtml bgcolor="#C8B0B0" ?>
       <entry> Fixing a design mistake in the searchers interface in Library 
Fundamentals </entry>
       <entry>
        <link xmlns:xlink="http://www.w3.org/1999/xlink"; 
xlink:href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0253r1.pdf";>
        P0253R1
        </link>
       </entry>
-      <entry align="center"> No </entry>
+      <entry align="center"> 7 </entry>
       <entry/>
     </row>
 
     <row>
-      <?dbhtml bgcolor="#C8B0B0" ?>
       <entry> Extending memory management tools </entry>
       <entry>
        <link xmlns:xlink="http://www.w3.org/1999/xlink"; 
xlink:href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0040r3.html";>
        P0040R3
        </link>
       </entry>
-      <entry align="center"> No </entry>
+      <entry align="center"> 7 </entry>
       <entry><code> </code></entry>
     </row>
 
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<typename _ForwardIterator1, typename _BinaryPredicate = equal_to<>>
     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 <algorithm>
 #include <testsuite_hooks.h>
 
+#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;

Reply via email to