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

    <tr>
        <th>Summary</th>
        <td>
            [clang] Bug with constraints when using nested classes and sizeof causing compilation failure of GNU ranges library
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

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

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

<pre>
    Newer versions of the library compile due to a workaround in the library for clang. I think the issue described below is still a bug though.

Short reproducer - https://godbolt.org/z/1qzac3vEj

```
template<typename T=int>
class bg {
public:
  template <int... h>
      requires (sizeof...(h) > 0) friend class l;
};
template <int... h>
 requires (sizeof...(h) > 0) class l;
void m() { bg v; } 
```

You need the nested class in a template (https://godbolt.org/z/1qzac3vEj) and sizeof (https://godbolt.org/z/3exhT3ahh) to reproduce this. 

It might be related to https://github.com/llvm/llvm-project/issues/61763
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVE1vszgQ_jXmMioCmwQ4cGiaZtVLL9s97NHGA3br2Kk_km1-_Qpo2rR69ap6ETI2npnnmU8egh4tYkdWG7LaZjxF5XyHRp-5wKi4lR5PIRNOvnWPeEIPR_RBOxvADRAVgtHCc_8GvdsftEGQCSE64HBy_oV7l6wEbb-IDs5Db7gdc3iAqLR9ma91CAlBYui9FihBoHEn0AFC1MYAB5FGiMqlUeWk2JLidln_Vs5H8HjwTqYePdyAivEQCLsldEfobnRSOBNz50dCd2dCd-XrmffseP98bYesi_d3PkbcHwyPSNhdfDug5XuEJ8K22kbC7heZ3vAQQIxA6s3y55CE0f0EPR8BLmaAsDttY57noD70YX48vibtMQChTdBndEOe54Q2itAWCLuHYtoMXqOVsEAawt4BSb392P8e62cw3-0fnZawJ7SZperN5O2RsA2Qegu_DNyy_usSWEQ5p9ZiiHjhri3wq7DQ5ufZoi1wK2Fh_xNVhv-pJ8bV7GN0n1Uy1V3I4ZrxQ4S9HlUEgeBxIicnlW8QOqok8t7tCd0Zc7x8bg7ePWMfCd3NdRwI3a3Les0y2THZspZn2JV1ua5Ktl43meqqqqK0rho29FVFhehXvVg3iHQQQyurKtMdLWhVrCilJatok5cCV0VTC9lgOQxNS6oC91ybfCIwOZ3N0F3LirbNDBdowtzZlM7tRiidmtx3M2GRxkCqwugQw6eFqKOZx8GisdrCJo1w0lFB72yInmsbA5wUWkhB2_FLbjFc56fni8QyGnjUzsLAtUkep-nx1-M_4LkdMVwmQ5a86f483ovfx47-HwAA___EYYYE">