Add not_fn test for throwing operator!

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271502 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2016-06-02 08:37:00 +00:00
parent dd7418914d
commit 3bf0d98eb1

View File

@@ -518,6 +518,14 @@ void call_operator_noexcept_test()
auto const& cret = ret; auto const& cret = ret;
static_assert(noexcept(cret()), "call should be noexcept"); 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>; using T = NoExceptCallable<EvilBool>;
T value(true); T value(true);