<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/94238>94238</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Trivial requires clause difference makes definition not match declaration
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          pkasting
      </td>
    </tr>
</table>

<pre>
    The following code compiles in gcc trunk with -std=c++20, but not in Clang:
```
struct S {
  template <typename T>
    requires((true))
  void f();
};

template <typename T>
  requires(true)
void S::f() {}  // [Clang-only] error: out-of-line definition of 'f' does not match any declaration in 'S'
```
Live repro: https://godbolt.org/z/fnPWb6vY1

I don't know which compiler matches the standard. gcc's behavior seems better in the abstract -- it doesn't feel as if adding or removing parens around a requirement should make it distinct for this purpose. But I don't know how far that stretches; is "true" the same requirement as "true && true"? How deeply should the compiler evaluate these before matching?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEVEGL8zYQ_TXjy5DgSEmcPfiw2dS00ENhF0qPsjSO1ZUlVxo7pL--yEl2w0fhA5FI1vO890ZPVinZsyeqYXeE3alQE_ch1uOnSmz9uWiDudYfPWEXnAsX68-ogyHUYRito4TW41lr5Dj5T7xY7nGV2IA8aRBHEEdRgnjDdmL0gTP6zSl_BvkK5QnKV9iX97EsE8dJM74jVMfbE0SmYXSKCUG-8XUkrwbCD5C_PACIkf6ZbKQE4gDiwHEiEC953BFzsAa7ZfcF5L0yVKfv-fL7U6YnngfJsrPUf8-m5OudZnFQnRBBNCAahN1xcb4K3l1hd0KKMUSQrxgmXoVu5awnNNRZb9kGj6FDEFUHokITKC3tGxTrHpW_oiHtVFQL0vqMfAdR_W9Pf7czYaQxhszWM48pK11knYNpg-N1iGcQzb8gms7_8We7n__aPDfmNzTBg6gYP3244KW3un9EIN5UUULuCRMrb1Q065wKEFXClno12xAxEQ15yUwxa85w1SaOSjOuVmh5MXrj6YgcqoS2Q2VMjl2IGGkIc56PKpJPqGKYvEH1OJeBPGPqw-QMDuqTlpI2B1kzdiEi9zbhOMUxJFrjcWL8wVkfLtipDFSMiSMtzkAe0SYEIW6nLm5WczqemdUXBEHsQezxDgfZ4K_hgoZodNeHwlzjq4c0Kzfl6HFPibClLkS6ddbm69IUppbmRb6ogupNtam2sqx226KvhTSbqtWa9lvabipDulWHVh7KnZFGmENha1GKbbkv5WZf7nbbtdRE1V5uqFTqUO0PsC1pUNatnZuHHIXCpjRR_bIV8lA41ZJLy_dBCE8XXDazq92piHV-Z9VO5wTb0tnE6bsKW3ZUf0Q7W-W-7g5qp6ZEaGzXUSSvaTmr9Jz976w_5byYoqt_iK_lfmrXOgwgmsx7_1uNMfxNmkE0i9oEorm5mWvxXwAAAP__twiWfg">