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

            Bug ID: 95303
           Summary: Member type of class template is incorrectly printed
                    in diagnostics when it fails to satisfy a concept
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ensadc at mailnesia dot com
                CC: asutton at gcc dot gnu.org
  Target Milestone: ---

https://godbolt.org/z/F5Hj38

====
template<class>
struct A {
    struct B {};
};

template<class T>
concept C = requires (T&& t) {
    t.a;
};

static_assert(C<A<int>::B>);
====
<source>:11:15: error: static assertion failed
   11 | static_assert(C<A<int>::B>);
      |               ^~~~~~~~~~~~
<source>:11:15: note: constraints not satisfied
<source>:7:9:   required by the constraints of 'template<class T> concept C'
<source>:7:13:   in requirements with 'T&& t' [with T = A<int>::B<int>]
<source>:8:7: note: the required expression 't.a' is invalid
    8 |     t.a;
      |     ~~^
cc1plus: note: set '-fconcepts-diagnostics-depth=' to at least 2 for more
detail
====
Note '[with T = A<int>::B<int>]'. It should be '[with T = A<int>::B]', without
the second `<int>`.

Reply via email to