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

            Bug ID: 110927
           Summary: GCC fails to parse dependent type in concept through
                    partial specialization
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: danakj at orodu dot net
  Target Milestone: ---

Repro: https://godbolt.org/z/rWbbGzWdb

```
#include <concepts>
#include <functional>

template <class T>
struct Foo;

template <>
struct Foo<int> {
    template <class U>
    using Type = U;
};

struct S {
    template <class U>
    using Type = U;
};

template <class T>
concept C1 = requires { typename Foo<T>::template Type<bool>; };

template <class T>
concept C2 = requires { typename T::template Type<bool>; };

int main() {
    static_assert(C1<int>);  // Fails with `the required type 'typename
Foo<T>::Type' is invalid`
    static_assert(C2<S>);  // Passes.
}
```

This is accepted by Clang and MSVC.

Reply via email to