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

    <tr>
        <th>Summary</th>
        <td>
            [libc++] `bitset` has non-conforming member typedef-names `iterator` and `const_iterator`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            libc++
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          frederick-vs-ja
      </td>
    </tr>
</table>

<pre>
    Currently, the following program doesn't compile with libc++ because libc++'s `bitset` has non-conforming `iterator` and `const_iterator` members (despite being private). [Godbolt link](https://godbolt.org/z/cPn6s9M68).

```C++
#include <bitset>

struct R {
    using iterator = int*;
    using const_iterator = const int*;
};

struct Derived : R, std::bitset<42> {};

int main()
{
    Derived::iterator i [[maybe_unused]]{};
 Derived::const_iterator j [[maybe_unused]]{};
}
```

https://github.com/llvm/llvm-project/blob/ef8d5069e1b8d322cd6905c03bef1b42e2e86515/libcxx/include/bitset#L190-L191
https://github.com/llvm/llvm-project/blob/ef8d5069e1b8d322cd6905c03bef1b42e2e86515/libcxx/include/bitset#L452-L453
https://github.com/llvm/llvm-project/blob/ef8d5069e1b8d322cd6905c03bef1b42e2e86515/libcxx/include/bitset#L567-L568

These iterator types are themselves useful, so I think we should just __uglify these typedef-names.


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMVE1v4zYQ_TXjC2GDHIqydNDBH-uiQAoUi94DkRxbTCjRECln3V9fSHYaOXvo9hbAsIQR5817M8NXx-hOHVEFagtqv6iH1IS-OvZkqXfmdXmJy5d6oYO9Vruh76lL_gq4Y6khdgzehzfXndi5D6e-bpkNFDvAdWImtGfnib251DDvtAHcAm6ZJlMPkWYhwHVkkHPtUqQEOWdNHVkXuqUJ3TH07VgAcu4S9XUK_Xii7uwYMqGL6Xn-oaVWUx8ZYGEpnl0ipunG0F3qRIDlioHa_hasDj4x77pXUHvAoknpHEFuAA-Ah9Pt-yr0J8DD34AH82eXx_KPvBghgO-Bb-7_Ob_9dnc9tyhK1xk_WGIgd3dt8ts8MaZ-MIl9Z7C-JzHG2BBHuu-aGMg9c10C3ID86dSj_unsFPqcAev9x_u89p56dyHLQG7Y93GsMdmxB3LzzniXIchvE8WfQFyXWFu7DnBsynupGcs7_A3xX5qOTcu2beurpuehGyLZcQZq_6nKY_4nsS-_ijK-Pw5qruHT2F1qBr0yoQU8eH95fyzPfXghkwAP2gcNeKBjYRXPSxK6sBLR2LzkynCp6Sh0hoRU5EqoEcBp8-MH4OG-ECPIrbson0TJl0-iFF-DTaZw-ZQp-TXYqHy9fFJ5MZ_XXw1F-rge6XqmyOqeRkNqI_kLRTZEOg5-WufAfmepcd0reyMWmzB4y16GmNjz83Dy7ngd8yJNOJaOy65uKT5c74WtpC1lWS-oEmssuMxyni2aqhBaG6ksP2osjOKFJak0ClEIJYwUC1chx0xwnvFS5lm2qoUuyfLaZNoUpArIOLW186uxjaPVLFyMA1VCCIFq4WtNPk7OjDj3Sxyduq-m5uvhFCHj3sUUP3CSS37y9Fma2v-ny97c87EZv2q9i6H31f_emElwBDzcNV8q_CcAAP__2_8AiQ">