// P2564R3 // { dg-do compile { target c++20 } } // Cribbed from clang's cxx2b-consteval-propagate.cpp. consteval int id(int i) { return i; } template constexpr int f(T t); auto a1 = &f; auto b1 = &f; template constexpr int f(T t) { return id(0); } template constexpr int f2(T); auto a2 = &f2; // { dg-error "taking address" } auto b2 = &f2; // { dg-error "taking address" } template constexpr int f2(T t) { return id(t); }