Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp2a
/
consteval23.C
blob: 4c7e844c4509f95524768b00e10be41a5b95b7a2 [
file
] [
log
] [
blame
]
// PR c++/102753
// { dg-do compile { target c++20 } }
consteval
int
foo
()
{
return
42
;
}
consteval
int
bar
(
int
(*
fn
)
()
=
foo
)
{
return
fn
();
}
static_assert
(
bar
()
==
42
);
static_assert
(
bar
(
foo
)
==
42
);