Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp1z
/
constexpr-if23.C
blob: 4f6cf3d5490081fa747ee77dcfbc5902daaef69d [
file
] [
log
] [
blame
]
// PR c++/85842
// { dg-do compile { target c++17 } }
template
<
class
T
>
auto
f
=
[](
auto
&&
arg
)
->
T
*
{
if
constexpr
(
sizeof
(
arg
)
==
1
)
{
return
nullptr
;
}
else
{
return
static_cast
<
T
*>(&
arg
);
}
};
auto
p
=
f
<int>
(
0
);