summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/function.objects
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/utilities/function.objects')
-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