Section
std::vector<bool>
std::vector
# Declarations
template<
class Allocator
> class vector<bool, Allocator>;
# Notes
If the size of the bitset is known at compile time, std::bitset may be used, which offers a richer set of member functions. In addition, boost::dynamic_bitset exists as an alternative to std::vector
Since its representation may be optimized, std::vector
The Boost.Container version of vector does not specialize for bool.
# Defect reports
| DR | Applied to | Behavior as published | Correct behavior |
|---|---|---|---|
| LWG 2187 | C++11 | specializations for bool lacked emplace and emplace_back member functions | added |