[cfe-dev] [libc++] Why doesn't libc++ define std::vector<bool>::const_reference as bool?
Eric Fiselier via cfe-dev
cfe-dev at lists.llvm.org
Tue Nov 14 15:13:16 PST 2017
Unless I'm mis-reading the spec, `vector<bool>::const_reference` is
implementation defined. Not bool. See [vector.bool]
On Tue, Nov 14, 2017 at 6:39 AM, Mikhail Maltsev via cfe-dev <
cfe-dev at lists.llvm.org> wrote:
> 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?
> Mikhail Maltsev
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev