summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/meta/meta.rel/is_nothrow_callable.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/utilities/meta/meta.rel/is_nothrow_callable.pass.cpp')
-rw-r--r--libcxx/test/std/utilities/meta/meta.rel/is_nothrow_callable.pass.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/libcxx/test/std/utilities/meta/meta.rel/is_nothrow_callable.pass.cpp b/libcxx/test/std/utilities/meta/meta.rel/is_nothrow_callable.pass.cpp
index 5cadc0bf8cb..eefa6d1f22b 100644
--- a/libcxx/test/std/utilities/meta/meta.rel/is_nothrow_callable.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.rel/is_nothrow_callable.pass.cpp
@@ -58,16 +58,16 @@ void test_noexcept_function_pointers()
{
// Check that PMF's and function pointers *work*. is_nothrow_callable will always
// return false because 'noexcept' is not part of the function type.
- static_assert(throws_callable<decltype(&Dummy::foo)(Dummy&)>());
- static_assert(throws_callable<decltype(&Dummy::bar)()>());
+ static_assert(throws_callable<decltype(&Dummy::foo)(Dummy&)>(), "");
+ static_assert(throws_callable<decltype(&Dummy::bar)()>(), "");
}
#else
{
// Check that PMF's and function pointers actually work and that
// is_nothrow_callable returns true for noexcept PMF's and function
// pointers.
- static_assert(std::is_nothrow_callable<decltype(&Dummy::foo)(Dummy&)>::value);
- static_assert(std::is_nothrow_callable<decltype(&Dummy::bar)()>::value);
+ static_assert(std::is_nothrow_callable<decltype(&Dummy::foo)(Dummy&)>::value, "");
+ static_assert(std::is_nothrow_callable<decltype(&Dummy::bar)()>::value, "");
}
#endif
}
@@ -77,39 +77,39 @@ int main()
{
// Check that the conversion to the return type is properly checked
using Fn = CallObject<true, int>;
- static_assert(std::is_nothrow_callable<Fn(), Implicit>::value);
- static_assert(std::is_nothrow_callable<Fn(), double>::value);
- static_assert(std::is_nothrow_callable<Fn(), const volatile void>::value);
- static_assert(throws_callable<Fn(), ThrowsImplicit>());
- static_assert(!std::is_nothrow_callable<Fn(), Explicit>());
+ static_assert(std::is_nothrow_callable<Fn(), Implicit>::value, "");
+ static_assert(std::is_nothrow_callable<Fn(), double>::value, "");
+ static_assert(std::is_nothrow_callable<Fn(), const volatile void>::value, "");
+ static_assert(throws_callable<Fn(), ThrowsImplicit>(), "");
+ static_assert(!std::is_nothrow_callable<Fn(), Explicit>(), "");
}
{
// Check that the conversion to the parameters is properly checked
using Fn = CallObject<true, void, const Implicit&, const ThrowsImplicit&>;
- static_assert(std::is_nothrow_callable<Fn(Implicit&, ThrowsImplicit&)>::value);
- static_assert(std::is_nothrow_callable<Fn(int, ThrowsImplicit&)>::value);
- static_assert(throws_callable<Fn(int, int)>());
- static_assert(!std::is_nothrow_callable<Fn()>::value);
+ static_assert(std::is_nothrow_callable<Fn(Implicit&, ThrowsImplicit&)>::value, "");
+ static_assert(std::is_nothrow_callable<Fn(int, ThrowsImplicit&)>::value, "");
+ static_assert(throws_callable<Fn(int, int)>(), "");
+ static_assert(!std::is_nothrow_callable<Fn()>::value, "");
}
{
// Check that the noexcept-ness of function objects is checked.
using Fn = CallObject<true, void>;
using Fn2 = CallObject<false, void>;
- static_assert(std::is_nothrow_callable<Fn()>::value);
- static_assert(throws_callable<Fn2()>());
+ static_assert(std::is_nothrow_callable<Fn()>::value, "");
+ static_assert(throws_callable<Fn2()>(), "");
}
{
// Check that PMD derefs are noexcept
using Fn = int (Tag::*);
- static_assert(std::is_nothrow_callable<Fn(Tag&)>::value);
- static_assert(std::is_nothrow_callable<Fn(Tag&), Implicit>::value);
- static_assert(throws_callable<Fn(Tag&), ThrowsImplicit>());
+ static_assert(std::is_nothrow_callable<Fn(Tag&)>::value, "");
+ static_assert(std::is_nothrow_callable<Fn(Tag&), Implicit>::value, "");
+ static_assert(throws_callable<Fn(Tag&), ThrowsImplicit>(), "");
}
{
// Check for is_nothrow_callable_v
using Fn = CallObject<true, int>;
- static_assert(std::is_nothrow_callable_v<Fn()>);
- static_assert(!std::is_nothrow_callable_v<Fn(int)>);
+ static_assert(std::is_nothrow_callable_v<Fn()>, "");
+ static_assert(!std::is_nothrow_callable_v<Fn(int)>, "");
}
test_noexcept_function_pointers();
}
OpenPOWER on IntegriCloud