aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2016-09-27 16:39:51 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2016-09-27 16:39:51 +0100
commit4940de303cccbba8b978355685b219db19ae8cde (patch)
tree105075f2a1ba8d574ad9f46489215a45e59fdd0b /libstdc++-v3
parentb658669de074fae705630470d21fa3d95fbc731f (diff)
downloadgcc-4940de303cccbba8b978355685b219db19ae8cde.zip
gcc-4940de303cccbba8b978355685b219db19ae8cde.tar.gz
gcc-4940de303cccbba8b978355685b219db19ae8cde.tar.bz2
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
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/doc/html/manual/status.html16
-rw-r--r--libstdc++-v3/doc/xml/manual/status_cxx2017.xml12
-rw-r--r--libstdc++-v3/include/std/functional1
-rw-r--r--libstdc++-v3/testsuite/20_util/function_objects/searchers.cc6
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 <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.
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++</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>
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..53103598 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;