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

            Bug ID: 108848
           Summary: Accessing class static member of non-dependent
                    expression using member syntax in dependent context is
                    rejected
           Product: gcc
           Version: 13.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: ---

Clang accepts the following, gcc thinks the expression in the line marked
"HERE" should be `tag<int>.template smbr<void>`.

    template <class T>
    struct tag_t {
      template <class Sig>
      static constexpr const Sig* smbr = nullptr; 
      int i = 0;
    };

    template <class T>
    inline constexpr tag_t<T> tag {};

    // This is OK
    using X = decltype(tag<int>.smbr<void>);

    template <class U>
    struct S {
      // This is incorrectly rejected by gcc
      using Y = decltype(tag<int>.smbr<void>);

      // This is OK
      using Z = decltype(tag_t<int>::smbr<void>);
    };

https://godbolt.org/z/9GoPYTYa1

Reply via email to