<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62028>62028</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
C++20 'requires(T x) {...}' shouldn't fail on abstract T
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
sthalik
</td>
</tr>
</table>
<pre>
This code fails with clang, succeeds with GCC and MSVC.
```c++
#include <concepts>
template<typename T> concept HasFoo = requires(T x) { { x.foo() } -> std::convertible_to<int>; };
struct foo_ { virtual int foo() const = 0; };
template<HasFoo T> void test_foo(const T&) {}
template void test_foo(const foo_&);
```
According to a person on `#gcc`
> GCC is correct there. see https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0929r2.html
> in essence, the check for whether that's ill-formed is 'delayed'
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0U8GO4ygQ_Rp8KcUiRSeODz50J-Pdy5422msLQzlmhkAWyp3pv1_hWDM9rR0J26LMe_UeVaVzdpdA1Indi9idKj3zFFOXedLefauGaN-78-QymGgJRu18hrvjCYzX4SLwCHk2hsiu4T-OR9DBwl9__3OshTwJ-by-9_KxjMCXsh5RVC4YP1sCoY4mBkM3zkJ9-Qhlut68ZhLqyO83CvpKcBbqC6zn4U-d-xhBqBMk-nd2ibLAwxm-C2xBNC_L870eYxR4eMROsCkMma1Qz0I9mxjeKLEbPL1yFOroAhcZqoBPQq16M6fZMIwxvi6kby7xrD24sARXehND5kWO_EzwwcuqenHyFp0FpsyvD5YHw1ngfrVQOH4h-A2kKHugfqT8cfMf7_TZmJisCxfgCBpulHIMEAOUc6guxnwCFJWluEsrpESGgSdKVANkIpiYb7lcJfYC-_v9XscbhU1mW8d0Edh_ZbMV2GeDWA5csOxsNFlgf9Mlv8Ae5fZQ9rLFNmE98dX_zO4CUM4UDJW244nATGS-wRgT3CcqaoAnzQKbDM77zRjTlWxRLLCx5PU7WYFNZTtlW9Xqirrt_rCVT3u53VVTN-i2HVuycpTUDEMrzX5v5G7Etj0cmnFXuQ4lKvkk263aKrWrd7Q9NOMeaVSt1aMUT5Ku2vna-7drMV65nGfq9ijxUHk9kM_LpCEGusPyUyCWwUtdwWyG-ZLFk_Quc_7Jwo49dcfH5KAsfv630eu6Lo2CDeQpzt4GgQ0vU1tKq4fMSRuGczUn3_1asovjaR5qE68C-5J4_WxuKX4lwwL7RW4p02LnvwAAAP__WDZGeA">