diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-06-02 08:37:00 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-06-02 08:37:00 +0000 |
commit | 881334e76ba49e87ce7a46b4eeb2b587aeac7902 (patch) | |
tree | 5be41a4638c2e93b0a2dfb8bdf35060722216b35 /libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp | |
parent | eb066bc29dee23b5576e5922293f0e9e219c18de (diff) | |
download | bcm5719-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.cpp | 8 |
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); |