summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-06-02 08:37:00 +0000
committerEric Fiselier <eric@efcs.ca>2016-06-02 08:37:00 +0000
commit881334e76ba49e87ce7a46b4eeb2b587aeac7902 (patch)
tree5be41a4638c2e93b0a2dfb8bdf35060722216b35 /libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp
parenteb066bc29dee23b5576e5922293f0e9e219c18de (diff)
downloadbcm5719-llvm-881334e76ba49e87ce7a46b4eeb2b587aeac7902.tar.gz
bcm5719-llvm-881334e76ba49e87ce7a46b4eeb2b587aeac7902.zip
Add not_fn test for throwing operator!
llvm-svn: 271502
Diffstat (limited to 'libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp')
-rw-r--r--libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp b/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp
index a338388fe7a..42ab466e41a 100644
--- a/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp
@@ -519,6 +519,14 @@ void call_operator_noexcept_test()
static_assert(noexcept(cret()), "call should be noexcept");
}
{
+ using T = NoExceptCallable<NoExceptEvilBool>;
+ T value(true);
+ auto ret = std::not_fn(value);
+ static_assert(noexcept(ret()), "call should not be noexcept");
+ auto const& cret = ret;
+ static_assert(noexcept(cret()), "call should not be noexcept");
+ }
+ {
using T = NoExceptCallable<EvilBool>;
T value(true);
auto ret = std::not_fn(value);
OpenPOWER on IntegriCloud