Suppress unused warnings in std::invoke tests.

llvm-svn: 273348
This commit is contained in:
Eric Fiselier 2016-06-22 00:58:06 +00:00
parent 91227f2195
commit c1d08ff069
1 changed files with 4 additions and 4 deletions

View File

@ -325,18 +325,18 @@ struct MemberObj {
void noexcept_test() {
{
NoThrowCallable obj;
CopyThrows arg;
NoThrowCallable obj; ((void)obj); // suppress unused warning
CopyThrows arg; ((void)arg); // suppress unused warning
static_assert(noexcept(std::invoke(obj)));
static_assert(!noexcept(std::invoke(obj, arg)));
static_assert(noexcept(std::invoke(obj, std::move(arg))));
}
{
ThrowsCallable obj;
ThrowsCallable obj; ((void)obj); // suppress unused warning
static_assert(!noexcept(std::invoke(obj)));
}
{
MemberObj obj{42};
MemberObj obj{42}; ((void)obj); // suppress unused warning.
static_assert(noexcept(std::invoke(&MemberObj::x, obj)));
}
}