Sign in
gnu
/
gcc
/
7d75ea04cf6d9c8960d5c6119d6203568b7069e9
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp1z
/
constexpr-if16.C
blob: 31a149702fd41e41864b02c549802d2caf147270 [
file
] [
log
] [
blame
]
// { dg-options -std=c++17 }
struct
A
{
constexpr
operator
bool
()
{
return
true
;
}
int
i
;
};
A a
;
template
<
class
T
>
void
f
()
{
constexpr
bool
b
=
a
;
if
constexpr
(
a
)
{
}
}
int
main
()
{
f
<int>
();
}