This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 118e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-11-05
Consider:
template <typename Ty>
struct S {
Ty i;
consteval S() = default;
};
template <typename Ty>
struct T {
Ty i;
consteval T() {}
};
S<int> one; // only Clang rejects
T<int> two; // Clang, GCC, ICC, MSVC reject
void locals() {
S<int> three; // only Clang rejects
T<int> four; // Clang, GCC, ICC, MSVC reject
}
A consteval function should always be evaluated at compile time and never fall back to runtime, thus all four cases should be rejected. Issue 2558 is related.