blob: 13a6039fce69c5c3ca9c7391969be7c6d2fe9ce4 [file] [log] [blame]
// PR c++/81676 - bogus -Wunused warnings in constexpr if.
// { dg-do compile { target c++17 } }
// { dg-options "-Wall -Wextra" }
int main()
{
auto f = [](auto a, auto b) {
if constexpr (sizeof(b) == 1) {
return a;
} else {
return b;
}
};
return f(1, 1) + f(1, 'a');
}