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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Interesting take the following:
```
void a(...);

template<typename T = void>
bool b1()
{  return requires (void (*v)(...)) { v(v(1)); }; }

bool c() { return b1(); }

```



Clang and GCC both say this returns 1 but MSVC returns 0. I think MSVC is
correct here ....

Unless I misunderstand how requires works. So I found a bug in clang too.



This is correctly rejected:
```

template<typename T = void>
concept b1 = requires (void (*v)(...)) { v(v(1)); };

bool c() { return b1; }

```

GCC gives the wrong value for this though:
```
template<typename T = void>
concept b1 = requires (T (*v)(...)) { v(v(1)); };

bool c() { return b1<void>; }
```

Which proves PR 119813 is the same.

Reply via email to