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

    <tr>
        <th>Summary</th>
        <td>
            Lamdba body SFINAE in requires-expression
        </td>
    </tr>

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

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

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

<pre>
    Per CWG 2672 https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#2672 it is intended that substitution failure within the body of a lambda inside a requires-expression is a hard error:

```c++
template <class T>
 void f(T) requires requires { []() { T::invalid; } (); };
void f(...);
int main() { f(0); } // should be ill-formed, similarly to http://eel.is/c++draft/temp.deduct.general#example-7
```

clang accepts the above calling `f(...)`; gcc rejects. IMO it would be better to follow gcc here and also reject, even if that is not the normative wording.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsU8uu4zYM_RplQ8Rw6MROFl7cx7gYoC-gF-iyoCXG5kCWUkmOZ_6-kH1fLQoIiSVR5OE5PBSjDI65VadHdXre0ZxGH1rWlKY57HpvfrS_c4CnP38CrBuEMaVbVNWDwk5htyxL4W_s9jGZwodBYfct6YPCLmrEHDBg3hmvo8JOL8NfpJPcuRjTZBVWa05JIBHEJXaGDaSREsS5j0nSnMQ7uJLYOTAskkZxkEaGjAz8FQgsTb0hEBfFMBAE_nuWwHHP32-BY8wJJALBSMEAh-BDxl8-q_Ltty63pRU-5rWeJp5ulhKDqp60pRjhRVVftju4ezFwVXh-UXh5L_nxoZpH2ChVeM4h-eAl160exN3JilHVI6jmGbaA152qXqu_FyiKYrvezsUlmEjcp7Q5qvxIAZs0EEc_WwM9g1i7v_owsVH4BFEmsRTsD0h-lfNdTWZbyKrTxoMJdE0Ku8xEYdjMOhUDOw6UpePvNN0s75v_kPiZWW3JDUBa8y3FVTfq_Z1Bk7XiBlB1-anHuswtDFpD4G-sUyzg6y-_5fFY3lrpOSUOGfnVW-uXNXrkwEDOANnoX9_mTvnODuS6DZREcD6tGJwPE-UphMUHI24odqatzKW60I7bQ30pj4cSy2Y3tnXZXxCRTH-giqrTCfvqiMY0fD41NR530mKJVdlgjYgVNkV9YWPOh4O5HOrm2qM6ljyR2MLa-5Q9spMYZ27r46E67yz1bOPqPkTHC6yXCjGbMbT5zb6fh6iOpZWY4keWJMly-zNNpqfNDX90X399-ALi_s8CuznY9t_mHSSNc19oPynsct7Xv_0t-I3CbkWTJ2JF-08AAAD__yVES9o">