aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/consteval-prop19.C
blob: 3ceb05e41f43edde9a35e34bf16a2d76af62ce94 (plain)
1
2
3
4
5
6
7
// P2564R3
// { dg-do compile { target c++20 } }

consteval int g(int p) { return p; }
template<typename T> constexpr auto f(T) { return g; }
int r = f(1)(2);      // proposed ok
int s = f(1)(2) + r;  // { dg-error "call to consteval function|returns address of immediate function" }