aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/consteval16.C
blob: 9b43de8b5faf9e309dc46e7945901fac64174ce6 (plain)
1
2
3
4
5
6
7
// { dg-do compile }
// { dg-options "-std=c++2a" }

consteval int foo () { return 0; }
int bar (int (*) ());
auto sz = sizeof (bar (foo));	// { dg-bogus "taking address of an immediate function" }
decltype (bar (foo)) baz;	// { dg-bogus "taking address of an immediate function" }