Define feature macro and update C++17 library status
authorJonathan Wakely <jwakely@redhat.com>
Tue, 27 Sep 2016 15:39:51 +0000 (16:39 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 27 Sep 2016 15:39:51 +0000 (16:39 +0100)
* 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
libstdc++-v3/doc/html/manual/status.html
libstdc++-v3/doc/xml/manual/status_cxx2017.xml
libstdc++-v3/include/std/functional
libstdc++-v3/testsuite/20_util/function_objects/searchers.cc

index 417deb815d00b28bf0cdfad865c7627f72ec0c66..69ec081cd0c4f2f99128e7cabf985bb440278fcd 100644 (file)
@@ -1,5 +1,10 @@
 2016-09-27  Jonathan Wakely  <jwakely@redhat.com>
 
+       * 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.
index 3c589791b5026adf744363b6a52cc6f6cc8a372d..ecc93a947c71149d76f0d675f73ac42447dbfc91 100644 (file)
@@ -523,11 +523,11 @@ Feature-testing recommendations for C++</a>.
        <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0220r1.html" target="_top">
        P0220R1
        </a>
-      </td><td align="center"> No </td><td align="left"> <code class="code">__cpp_lib_shared_ptr_arrays &gt;= 201603</code> </td></tr><tr bgcolor="#C8B0B0"><td align="left"> Library Fundamentals V1 TS Components: Searchers </td><td align="left">
+      </td><td align="center"> No </td><td align="left"> <code class="code">__cpp_lib_shared_ptr_arrays &gt;= 201603</code> </td></tr><tr><td align="left"> Library Fundamentals V1 TS Components: Searchers </td><td align="left">
        <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0220r1.html" target="_top">
        P0220R1
        </a>
-      </td><td align="center"> No </td><td align="left"> <code class="code">__cpp_lib_boyer_moore_searcher &gt;= 201603</code> </td></tr><tr><td align="left"> Constant View: A proposal for a <code class="code">std::as_const</code> helper function template        </td><td align="left">
+      </td><td align="center"> 7 </td><td align="left"> <code class="code">__cpp_lib_boyer_moore_searcher &gt;= 201603</code> </td></tr><tr><td align="left"> Constant View: A proposal for a <code class="code">std::as_const</code> helper function template </td><td align="left">
        <a class="link" href="" target="_top">
        P0007R1
        </a>
@@ -582,19 +582,19 @@ Feature-testing recommendations for C++</a>.
        <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0005r4.html" target="_top">
        P0005R4
        </a>
-      </td><td align="center"> 7 </td><td align="left"><code class="code">__cpp_lib_not_fn &gt;= 201603</code></td></tr><tr bgcolor="#C8B0B0"><td align="left"> Fixes for <code class="code">not_fn</code> </td><td align="left">
+      </td><td align="center"> 7 </td><td align="left"><code class="code">__cpp_lib_not_fn &gt;= 201603</code></td></tr><tr><td align="left"> Fixes for <code class="code">not_fn</code> </td><td align="left">
        <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0358r1.html" target="_top">
        P0358R1
        </a>
-      </td><td align="center"> No </td><td align="left"> </td></tr><tr bgcolor="#C8B0B0"><td align="left"> Fixing a design mistake in the searchers interface in Library Fundamentals </td><td align="left">
+      </td><td align="center"> 7 </td><td align="left"> </td></tr><tr><td align="left"> Fixing a design mistake in the searchers interface in Library Fundamentals </td><td align="left">
        <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0253r1.pdf" target="_top">
        P0253R1
        </a>
-      </td><td align="center"> No </td><td align="left"> </td></tr><tr bgcolor="#C8B0B0"><td align="left"> Extending memory management tools </td><td align="left">
+      </td><td align="center"> 7 </td><td align="left"> </td></tr><tr><td align="left"> Extending memory management tools </td><td align="left">
        <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0040r3.html" target="_top">
        P0040R3
        </a>
-      </td><td align="center"> No </td><td align="left"><code class="code"> </code></td></tr><tr><td align="left"> <code class="code">shared_ptr::weak_type</code></td><td align="left">
+      </td><td align="center"> 7 </td><td align="left"><code class="code"> </code></td></tr><tr><td align="left"> <code class="code">shared_ptr::weak_type</code></td><td align="left">
        <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0163r0.html" target="_top">
        P0163R0
        </a>
@@ -693,11 +693,11 @@ Feature-testing recommendations for C++</a>.
        </a>
       </td><td align="center"> No </td><td align="left"><code class="code"> __cpp_lib_gcd &gt;= 201606 </code>,
             <code class="code"> __cpp_lib_lcm &gt;= 201606 </code>
-      </td></tr><tr bgcolor="#C8B0B0"><td align="left"> Proposal to Introduce a 3-Argument Overload to <code class="code">std::hypot</code> </td><td align="left">
+      </td></tr><tr><td align="left"> Proposal to Introduce a 3-Argument Overload to <code class="code">std::hypot</code> </td><td align="left">
        <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0030r1.pdf" target="_top">
        P0030R1
        </a>
-      </td><td align="center"> No </td><td align="left"><code class="code"> __cpp_lib_hypot &gt;= 201603 </code></td></tr><tr><td align="left"> Mathematical Special Functions for C++17 </td><td align="left">
+      </td><td align="center"> 7 </td><td align="left"><code class="code"> __cpp_lib_hypot &gt;= 201603 </code></td></tr><tr><td align="left"> Mathematical Special Functions for C++17 </td><td align="left">
        <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0226r1.pdf" target="_top">
        P0226R1
        </a>
index 4ead6b996c41e5f681f4fe03a07790ac0d0ffb04..feed08514ce2be4276616f81694e3f68b8f74f15 100644 (file)
@@ -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>
 
index c750a8374bc1daca953ee6c88a11b962230d0ee1..8b2389c7250a4c0cae11c083d5955831a8a5ff0a 100644 (file)
@@ -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
index 1c7276207d9fb99fa4eddd77171b28b0cea351f9..53103598d0982227fefbaae74ec4ae95337a01bc 100644 (file)
 #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;