Sign in
nest-open-source
/
stadia-controller
/
gcc-arm-none-eabi
/
3c699435f69c74a12f5fe18c0181fba6f1dd0479
/
.
/
src
/
gcc
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
constexpr-52892-2.C
blob: d2062cee842bd0388d9273030a9f2fb34ec6aa53 [
file
] [
log
] [
blame
]
// PR c++/52892
// { dg-do compile { target c++11 } }
constexpr
bool
is_negative
(
int
x
)
{
return
x
<
0
;
}
typedef
bool
(*
Function
)(
int
);
constexpr
bool
check
(
int
x
,
Function
p
)
{
return
p
(
x
);
}
static_assert
(
check
(-
2
,
is_negative
),
"Error"
);