It won’t compile, unless your implementation has a non-standard extension. The specialisation of std::vector<bool>
, as specified in C++11 23.3.7/1, doesn’t declare a data
member.
More Related Contents:
- push_back vs emplace_back
- Why can I not push_back a unique_ptr into a vector?
- Why do I get the same sequence for every run with std::random_device with mingw gcc4.8.1?
- Why can’t simple initialize (with braces) 2D std::array? [duplicate]
- Nice way to append a vector to itself
- Is the size of std::array defined by standard
- Why is the C++ initializer_list behavior for std::vector and std::array different?
- Why is template argument deduction disabled with std::forward?
- What does the standard library guarantee about self move assignment?
- Why use non-member begin and end functions in C++11?
- std::map emplace without copying value
- How to declare a vector of atomic in C++
- std::optional specialization for reference types
- Non-copyable elements in vector
- what is the best modern c++ approach to construct and manipulate a 2d array [closed]
- What is the default hash function used in C++ std::unordered_map?
- C++11 STL containers and thread safety
- How do I erase elements from STL containers?
- Comparing 3 modern c++ ways to convert integral values to strings
- Can std::vector emplace_back copy construct from an element of the vector itself?
- Why can’t I replace std::map with std::unordered_map
- stl random distributions and portability
- Are lambdas inlined like functions in C++?
- Why vector access operators are not specified as noexcept?
- Why isn’t std::array::size static?
- error for hash function of pair of ints
- STL algorithms: Why no additional interface for containers (additional to iterator pairs)?
- const auto std::initializer_list difference between Clang and GCC
- C++11 std::to_string(double) – No trailing zeros
- Can the ‘type’ of a lambda expression be expressed?