<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:mclow.lists@gmail.com" title="Marshall Clow (home) <mclow.lists@gmail.com>"> <span class="fn">Marshall Clow (home)</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WONTFIX - bitset::const_reference is an extension"
   href="https://llvm.org/bugs/show_bug.cgi?id=24435">bug 24435</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>WONTFIX
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WONTFIX - bitset::const_reference is an extension"
   href="https://llvm.org/bugs/show_bug.cgi?id=24435#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WONTFIX - bitset::const_reference is an extension"
   href="https://llvm.org/bugs/show_bug.cgi?id=24435">bug 24435</a>
              from <span class="vcard"><a class="email" href="mailto:mclow.lists@gmail.com" title="Marshall Clow (home) <mclow.lists@gmail.com>"> <span class="fn">Marshall Clow (home)</span></a>
</span></b>
        <pre>Yes, it is an extension.
The purpose is to increase consistency among the containers.

Consider the following code (from Howard):

#include <vector>
#include <bitset>
#include <cassert>

template <class Container>
void
test(Container& c, Container const& cc)
{
    using const_ref = typename Container::const_reference;
    assert(&c == &cc);
    const_ref cr = cc[0];
    assert(cr == c[0]);
    c[0] = 1;
    assert(cr == c[0]);
}

int
main()
{
    std::vector<char> vc{1};
    test(vc, vc);
    std::bitset<1> bs;
    test(bs, bs);
    std::vector<bool> vb{1};
    test(vb, vb);
}

This compiles and runs w/o error in libc++.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>