https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68495
--- Comment #1 from Samuel Neves <sneves at dei dot uc.pt> ---
Minimal example can be further reduced to
template<int> struct int_seq {};
constexpr struct {
constexpr int operator()(int x) const { return x + 1; }
} f1 {};
template<typename F, int A>
auto f2(F f, int_seq<A>) -> int_seq<f(A)> {
return {};
}
int main() {
f2(f1, int_seq<0>{});
}
This suggests that the issue is with GCC not recognizing that `f::operator()`
is constexpr; this information is seemingly lost somewhere along the way.