<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/145521>145521</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
nested class with out-of-class-definition and requires clause fails to compile
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
bernd5
</td>
</tr>
</table>
<pre>
The following code fails to compile:
```c++
template <typename X>
concept is_valid = true;
template<typename T>
class Nesting
{
public:
template<typename Q> requires is_valid<Q>
class Inner;
};
template<typename T>
template<typename Q> requires is_valid<Q>
class Nesting<T>::Inner {};
```
with the error message:
```
<source>:13:31: error: requires clause differs in template redeclaration
13 | template<typename Q> requires is_valid<Q>
| ^
<source>:8:35: note: previous template declaration is here
8 | template<typename Q> requires is_valid<Q>
| ^
1 error generated.
Compiler returned: 1
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyclE9v4ywQxj8NvowS8ceOk4MPbtpI7-WVKvWwtxWGic2KgBdwqn77FbabdrfValWEZGT7eeY3M4CM0fQOsSHVHanuCzmlwYemw-B0VXRevzRPA8LZW-ufjetBeY1wlsZGSB6Uv4zGIhEtofPc0WUqwu_ypG3Cy2hlQiDimF5GdPKC8I2IB0Jb5Z3CMYGJ36_SGg1E3EMKExJxtxi-qt-Ln1axlTHC_xiTcX3-u86aceqsUQsQfKZ-JOIBAv6cTMB4i0zE8XGxBQBYrP9zDsNKUt__C9JX4v2ehjjOVqIlop3jQ07rFv21vAvJs0kDpAEBQ_ABLhij7D9pRl6LY_RTULi4M0FEKxgR7aLNixujsnKKCNqczxgiGHerIwTUqKwMMhnvlmIxAaQ-frnUMKtJ9fARcp8Zq4zmfDZuYQx4NX6Kb0DvcMBEGDDgaryfjfP4Etqr-O9j4WZrA3p0GGRCvSW0PS5HI0DANAWHOifA3rel0I3QB3GQBTasrmhd71hNi6HZH-q6FCj2TDCqdxU964pRofUBD10pRGEaTnlFd7xkZckrumX7jqpSabVnHdMVIyXFizR2a-31svWhL0yMEzasrCrOCis7tHE-85w7fIb5K-E8XwGhyaJNN_WRlNSamOKbTTLJYuMwJtTrMZl3oZ_Sxp8385uNxrNxZu6JdPrDxvrz9iimYJshpTHmrctPhJ96k4ap2yp_IfyUg6-PzRj8D1SJ8NOMHAk_rTldG_4rAAD___9ce1g">