This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/68495] Error when expanding nontype variadic argument in trailing return type


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]