<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/63401>63401</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang][c++20] Differing behaviour vs msvc and gcc when mixing CRTP and concepts
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
octurion
</td>
</tr>
</table>
<pre>
I was implementing an idea from [the following blog post](https://www.reachablecode.com/2019/06/09/concept-based-interfaces/) and [the followup discussion on Reddit](https://www.reddit.com/r/cpp/comments/c39asd/interfaces_with_c20_concepts/) so as to enforce that any CRTP derived class would implement the interfaces the CRTP base class relies on.
The code is as follows: [testcase.txt](https://github.com/llvm/llvm-project/files/11798407/testcase.txt)
However, `clang` seems to reject this specific piece of code (https://godbolt.org/z/9KGhTPncW).
What is more surprising is that it appears that both:
- `gcc` (https://godbolt.org/z/aWqre6rf5)
- and `msvc` (https://godbolt.org/z/fjbKPqr6j)
Accept this piece of code.
This means that at least one compiler is incorrect or (highly unlikely, but you never know) the C++ standard is ambiguous in that specific case.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVM1u4zYQfhr6Mogh05ZtHXRI1nBb7CVYBMgxoMiRNFmK1HIoa92nL0g5m2ZbFNuLLGHM-X7m4yhm6hxiLcoHUZ5Waoq9D7XXcQrk3arx5lr_AbNioGG0OKCL5DpQDsiggjb4AUT5EHuE1lvr51RtrO9g9BxFeRLy2Mc4stjeC3kW8jzP8zqg0r1qLGpvcK39IORZFptKyHOxT4_0pr3TOMa7RjGaO3IRQ6s0cm5TgXLmI_I0giHWEzN5B97BFzSG_oNDqt7AQ8Ibx4w6JJEJRW8rxUbI8zv2y0yxf9GyeLmxe2PDHhRD9ICu9UEjxF5FUO4Kn748PYLBQBc0oK1ihtlP1rwbCknDO0b-zKeS8tuRgJaQwbu1KE6iuF-eTz1CshCIE_ziQ5KZnUGOWjGu4_d_NaGj2E_NzQBrL28_d2Pwr6ijkOeWbPZ7szlUx11xEPL8oaus_s7mdz_jBYOQn0DsC22V68S-AEYcsjUBU1uIPTHwiJpa0jASagTfLjr-SdKbxtu49qET8vynkOfq82_906PTz0JWH8x4To4Tw-ADAk9hDMQpjcTLMCiCGkdU4fbd-NgnnHz4LlHutE6Ef4GEev4WcB_a8ocFd0sg98XAl1_t0r42nx-_hf3rT0be6xStxagP_vw0_CQWlbvpUREsKo7gXUrFMJLFkNST0z6EZL0PmRZ1vb3C5Cx9RXtN82qmCFc_gUsDhK_OzynUOYhCPgj5AByVMyqYHLWhoW7yU2q9YP8YZ47GytRbU20rtcJ6sz8eZLndHuSqr8sDGtkem7bcaF2WG3XUeChkqbRqKl21K6plIbfFXhZFJautXG_Ko2yb5tAe5U6Wu4PYFTgosuuU1GTlipgnrPfbXbFZWdWg5bzMpHQ4Qy4KKdNuC3VOdzN1LHaFJY783iVStHkLLrEtT-l1kS4LUZ7gRG2LIW837NWF_BTgwpCmnSffaQ1zjw4G-p7-lS9wKrwtitUUbP2_b2AWkK5gFvhXAAAA__-H-9if">