<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/74314>74314</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang does not diagnose out-of-line definition that does not match due to nested requirements
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang:frontend,
concepts
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ilya-biryukov
</td>
</tr>
</table>
<pre>
```cpp
template <class T, class U> constexpr bool is_same_v = __is_same(T, U);
template <class T, class U> constexpr bool is_not_same_v = !__is_same(T, U);
template <class Result>
concept something_interesting = requires {
true;
requires is_same_v<int, Result>;
};
template <class T>
struct X {
void foo() requires requires { requires is_not_same_v<T, int>; };
};
template <class T>
void X<T>::foo() requires requires { requires something_interesting<T>; } {
}
```
Expected: an error that out-of-line definition does not match.
Actual: compiles without an error.
See [godbolt](https://gcc.godbolt.org/z/r7K4P15o5) too.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyclE-PszYQxj_NcLESgYEkHDhkk82ll6rdlfYWGTOAW-Oh9pDu9tNXkGyyefXu-09CwtjmeX7zjEGFYFqHWEL-APk-UiN35Etj39SiMv5t_JtOUUX1Wwmr-HzpYYB4D_GWsR-sYhSQ7rRVIYgnkDtxHj5D-ig0ucD4OnhREVlhwjGoHo8nAeleHI-XZ5Cb-cVnkAWkD78u7og_GoBMvu3xmdMfGEbLkD6eN2hyGgcWgXrkzrj2aByjx8DGtbOTx39G4zEIWF-khRCC_YhXr2niuu0aBKQ743gCu3le6db775I-XSED-1GzeLlHOJGpRUMEcgOyuAF8BL7DukUI6W5ObOKbqcQd0E_BzRgvs-IktYV0-8NQX039KjVT3WqesM6D99P6EfHxdUDNWEO6FcoJ9J684E6xoJEX1CyscShqbIwzbMiJmjAIRyx6xbpbnlW2mkdlJw1N_WAsBvGv4Y5Gvopedv6JKCB_aKmuyDLke5CbjnkIUwTyAPLQar28LC_JtyAP_4E8-PVv2e9JTvkUDxMto7pM6yItVIRlso6TVSGLYhN1ZVI0WMW1LORKJXlRVRtEqfSm1lXWZCsdmVLGMk1knCVSFnm2TNJsk2YNFoVcV1mTQBZjr4xdWnvqJ4bIhDBiuc7SJIusqtCG-ecgpbZqSn7beHKMrgYpQe6mhfMHEqaJfB_5ctJaVGMbIIutCRxu6mzYYrmbpG7x1ka1jgJ-1oe5R_fNEPWIgkk4DIz1-3Hp0XGIRm_LL3I23I3VUlMP8jCxXG6LwdNfqBnkYS47gDzMlf8fAAD__6Gbl74">