[cfe-dev] [libc++] Why doesn't libc++ define std::vector<bool>::const_reference as bool?

Mikhail Maltsev via cfe-dev cfe-dev at lists.llvm.org
Tue Nov 14 05:39:12 PST 2017


Hi. According to the C++ Standard (section [vector.bool]),
std::vector<bool>::const_reference should be defined as bool. libc++
defines it as std::__1::__bit_const_reference<std::__1::vector<bool,
std::__1::allocator<bool>>>]. Is this divergence from the standard
intentional? If it is, what is the purpose?

-- 
Regards,
   Mikhail Maltsev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20171114/2e0afab0/attachment.html>


More information about the cfe-dev mailing list