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

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
ince-on-invalid-code with gcc-8-branch, accepts-invalid with gcc-9-branch,
correctly rejected with trunk using -std=c++17 -fconcepts:

68429.cc: In function 'int main()':
68429.cc:19:8: error: cannot call function 'void f(auto:1) [with auto:1 = A]'
   19 |   f(A());
      |        ^
68429.cc:14:6: note: constraints not satisfied
   14 | void f(C2) {}
      |      ^
68429.cc: In function 'void f(auto:1) [with auto:1 = A]':
68429.cc:7:14:   required for the satisfaction of 'C2<A>'
68429.cc:8:10:   in requirements with 'A expr', '<typeprefixerror>x'
68429.cc:8:44: error: 'struct A' has no member named 'identity'
    8 |   return requires(Expr expr, decltype(expr.identity) x) {
      |                                       ~~~~~^~~~~~~~

So seems to be fixed.

Reply via email to