<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Actually Howard explains this non-conformance in a self answer Stackoverflow question "Why is libc++'s vector<bool>::const_reference not bool?”:<div class=""><br class=""></div><div class=""> <a href="https://stackoverflow.com/q/31974237/1708801" class="">https://stackoverflow.com/q/31974237/1708801</a></div><div class=""><br class=""></div><div class="">Regards</div><div class=""> Shafik<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Nov 14, 2017, at 5:28 PM, Eric Fiselier via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Looking again, it seems like a libc++ bug. Not sure if Howard intended to be non-conforming here, but it's likely a mistake.<div class=""><br class=""></div><div class="">Feel free to file a bug.</div><div class=""><br class=""></div><div class="">/Eric</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, Nov 14, 2017 at 4:20 PM, Hubert Tong <span dir="ltr" class=""><<a href="mailto:hubert.reinterpretcast@gmail.com" target="_blank" class="">hubert.reinterpretcast@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><span class="">On Tue, Nov 14, 2017 at 6:13 PM, Eric Fiselier via cfe-dev <span dir="ltr" class=""><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank" class="">cfe-dev@lists.llvm.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="">Unless I'm mis-reading the spec, `vector<bool>::const_reference<wbr class="">` is implementation defined. Not bool. See <a href="http://eel.is/c++draft/vector.bool" target="_blank" class="">[vector.bool]</a>.</div></blockquote></span><div class="">It says: <br class=""></div><div class=""><pre class="m_-8085601205000997939gmail-codeblock">using const_reference = bool;</pre><br class=""> </div><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class=""><div class=""><br class=""></div><div class="">/Eric</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote"><div class=""><div class="m_-8085601205000997939gmail-h5">On Tue, Nov 14, 2017 at 6:39 AM, Mikhail Maltsev via cfe-dev <span dir="ltr" class=""><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank" class="">cfe-dev@lists.llvm.org</a>></span> wrote:<br class=""></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><div class="m_-8085601205000997939gmail-h5"><div dir="ltr" class=""><div style="font-family:monospace,monospace" class="">Hi. According to the C++ Standard (section [vector.bool]), std::vector<bool>::const_refer<wbr class="">ence should be defined as bool. libc++ defines it as std::__1::__bit_const_referenc<wbr class="">e<std::__1::vector<bool, std::__1::allocator<bool>>>]. Is this divergence from the standard intentional? If it is, what is the purpose?<span class="m_-8085601205000997939gmail-m_-436574453916234742HOEnZb"><font color="#888888" class=""><br clear="all" class=""></font></span></div><span class="m_-8085601205000997939gmail-m_-436574453916234742HOEnZb"><font color="#888888" class=""><br class="">-- <br class=""><div class="m_-8085601205000997939gmail-m_-436574453916234742m_-3210636199286463016gmail_signature">Regards,<br class=""> Mikhail Maltsev</div>
</font></span></div>
<br class=""></div></div>______________________________<wbr class="">_________________<br class="">
cfe-dev mailing list<br class="">
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank" class="">cfe-dev@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/<wbr class="">mailman/listinfo/cfe-dev</a><br class="">
<br class=""></blockquote></div><br class=""></div>
<br class="">______________________________<wbr class="">_________________<br class="">
cfe-dev mailing list<br class="">
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank" class="">cfe-dev@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/<wbr class="">mailman/listinfo/cfe-dev</a><br class="">
<br class=""></blockquote></span></div><br class=""></div></div>
</blockquote></div><br class=""></div>
_______________________________________________<br class="">cfe-dev mailing list<br class=""><a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev<br class=""></div></blockquote></div><br class=""></div></body></html>