Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/consteval-prop17.C

raw
1 // P2564R3
2 // { dg-do compile { target c++20 } }
3 // { dg-options "-fno-immediate-escalation" }
4
5 consteval int id(int i) { return i; }
6
7 constexpr int
8 f (auto i)
9 {
10 return id (i); // { dg-error "not a constant expression" }
11 }
12
13 int
14 g ()
15 {
16 return f (42);
17 }