https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110680

            Bug ID: 110680
           Summary: erroneous error "non-template type 'C' used as a
                    template"
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eric.niebler at gmail dot com
  Target Milestone: ---

The following valid C++20 is rejected by gcc trunk:


  template <auto X = []{}>
  struct S {
    auto f() { return X; }
  };

  template <class T>
  using C = decltype(S().f());

  using D = C<int>;


<source>:29:16: error: non-template type 'C' used as a template
   29 | using D = C<int>;
      |                ^
Compiler returned: 1


https://godbolt.org/z/b3eY8fWTv
  • [Bug c++/110680] New: erroneous... eric.niebler at gmail dot com via Gcc-bugs

Reply via email to