forked from OSchip/llvm-project
Suppress unused warnings in std::invoke tests.
llvm-svn: 273348
This commit is contained in:
parent
91227f2195
commit
c1d08ff069
|
@ -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)));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue