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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
I don't see GCC 15 accepting that testcase; I get

wa.C: In function ‘int main()’:
wa.C:12:4: error: no matching function for call to ‘f(int)’
   12 |   f(0);
      |   ~^~~
wa.C:12:4: note: there is 1 candidate
wa.C:9:6: note: candidate 1: ‘template<class auto:1>  requires  D1<auto:1> void
f(auto:1)’
    9 | void f(D1 auto) {}
      |      ^
wa.C:9:6: note: template argument deduction/substitution failed:
wa.C:9:6: note: constraints not satisfied
wa.C: In substitution of ‘template<class auto:1>  requires  D1<auto:1> void
f(auto:1) [with auto:1 = int]’:
wa.C:12:4:   required from here
   12 |   f(0);
      |   ~^~~
wa.C:5:9:   required for the satisfaction of ‘D1<auto:1>’ [with auto:1 = int]
wa.C:5:14:   in requirements with ‘T t’ [with T = int]
wa.C:6:5: note: ‘t’ does not satisfy return-type-requirement, because
    6 |   { t } -> C1;
      |     ^
wa.C:6:5: error: deduced expression type does not satisfy placeholder
constraints
wa.C:6:5: note: constraints not satisfied
wa.C:2:9:   required for the satisfaction of ‘C1<decltype(auto) [requires
::C1<<placeholder>, >]>’ [with decltype(auto) [requires ::C1<<placeholder>, >]
= int&]
wa.C:2:24: error: invalid operands of types ‘long unsigned int’ and
‘std::nullptr_t’ to binary ‘operator==’
    2 | concept C1 = sizeof(T) == nullptr;

so this isn't really accepts-invalid.  The concept itself is IFNDR.

Reply via email to