| 1 |
// P2564R3 |
| 2 |
// { dg-do compile { target c++20 } } |
| 3 |
|
| 4 |
consteval int g(int p) { return p; } |
| 5 |
template<typename T> constexpr auto f(T) { return g; } |
| 6 |
int r = f(1)(2); // proposed ok |
| 7 |
int s = f(1)(2) + r; // { dg-error "call to consteval function|returns address of immediate function" } |