public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/110927] New: GCC fails to parse dependent type in concept through partial specialization
@ 2023-08-07  2:44 danakj at orodu dot net
  2023-08-07  2:53 ` [Bug c++/110927] " pinskia at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: danakj at orodu dot net @ 2023-08-07  2:44 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-08-16 17:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-07  2:44 [Bug c++/110927] New: GCC fails to parse dependent type in concept through partial specialization danakj at orodu dot net
2023-08-07  2:53 ` [Bug c++/110927] " pinskia at gcc dot gnu.org
2023-08-08  2:49 ` waffl3x at protonmail dot com
2023-08-09 18:10 ` ppalka at gcc dot gnu.org
2023-08-09 18:10 ` ppalka at gcc dot gnu.org
2023-08-09 18:11 ` ppalka at gcc dot gnu.org
2023-08-11 17:26 ` cvs-commit at gcc dot gnu.org
2023-08-16 16:10 ` cvs-commit at gcc dot gnu.org
2023-08-16 17:17 ` ppalka at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).