On 05/10/16 12:31 +0100, Jonathan Wakely wrote:
diff --git a/libstdc++-v3/testsuite/20_util/not_fn/1.cc
b/libstdc++-v3/testsuite/20_util/not_fn/1.cc
index 375c7cc..8d6e9ec 100644
--- a/libstdc++-v3/testsuite/20_util/not_fn/1.cc
+++ b/libstdc++-v3/testsuite/20_util/not_fn/1.cc
@@ -84,6 +84,12 @@ test04()
VERIFY( not_fn(f)(d) );
}
+void
+test05()
+{
+ auto nf{ std::not_fn([] { return false; }) };
+}
+
int
main()
{
diff --git a/libstdc++-v3/testsuite/experimental/functional/not_fn.cc
b/libstdc++-v3/testsuite/experimental/functional/not_fn.cc
index d508028..59d7621 100644
--- a/libstdc++-v3/testsuite/experimental/functional/not_fn.cc
+++ b/libstdc++-v3/testsuite/experimental/functional/not_fn.cc
@@ -84,6 +84,12 @@ test04()
VERIFY( not_fn(f)(d) );
}
+void
+test05()
+{
+ auto nf{ not_fn([] { return false; }) };
+}
+
int
main()
{
Gah, this aren't the tests I meant to commit. Fixed on trunk like so,
with tests that actually failed before the fix.
commit 998cf48ef12d44d215acb70f80600e46648da94f
Author: Jonathan Wakely <jwak...@redhat.com>
Date: Wed Oct 5 13:19:38 2016 +0100
70564 fix newly-added tests for not_fn
PR libstdc++/70564
* testsuite/20_util/not_fn/1.cc: Fix test.
* testsuite/experimental/functional/not_fn.cc: Likewise.
diff --git a/libstdc++-v3/testsuite/20_util/not_fn/1.cc b/libstdc++-v3/testsuite/20_util/not_fn/1.cc
index 8d6e9ec..233a6d3 100644
--- a/libstdc++-v3/testsuite/20_util/not_fn/1.cc
+++ b/libstdc++-v3/testsuite/20_util/not_fn/1.cc
@@ -87,7 +87,8 @@ test04()
void
test05()
{
- auto nf{ std::not_fn([] { return false; }) };
+ auto nf = std::not_fn([] { return false; });
+ auto copy(nf); // PR libstdc++/70564
}
int
diff --git a/libstdc++-v3/testsuite/experimental/functional/not_fn.cc b/libstdc++-v3/testsuite/experimental/functional/not_fn.cc
index 59d7621..525f59c 100644
--- a/libstdc++-v3/testsuite/experimental/functional/not_fn.cc
+++ b/libstdc++-v3/testsuite/experimental/functional/not_fn.cc
@@ -87,7 +87,8 @@ test04()
void
test05()
{
- auto nf{ not_fn([] { return false; }) };
+ auto nf = std::experimental::not_fn([] { return false; });
+ auto copy(nf); // PR libstdc++/70564
}
int