Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/container/vector bool"

From cppreference.com
< cpp‎ | container
m (Text replace - "{{tdcl" to "{{dcl")
m (Text replace - "container/tdcl" to "container/dcl")
Line 17: Line 17:
 
{{dcl list begin}}
 
{{dcl list begin}}
 
{{dcl list hitem | Member type | Definition}}
 
{{dcl list hitem | Member type | Definition}}
{{dcl list template | cpp/container/tdcl list value_type | vector_bool}}
+
{{dcl list template | cpp/container/dcl list value_type | vector_bool}}
{{dcl list template | cpp/container/tdcl list allocator_type | vector_bool}}
+
{{dcl list template | cpp/container/dcl list allocator_type | vector_bool}}
{{dcl list template | cpp/container/tdcl list size_type | vector_bool}}
+
{{dcl list template | cpp/container/dcl list size_type | vector_bool}}
{{dcl list template | cpp/container/tdcl list difference_type | vector_bool}}
+
{{dcl list template | cpp/container/dcl list difference_type | vector_bool}}
 
{{dcl list class | cpp/container/vector_bool/reference | proxy class representing a reference to a single bool}}
 
{{dcl list class | cpp/container/vector_bool/reference | proxy class representing a reference to a single bool}}
{{dcl list template | cpp/container/tdcl list const_reference | vector_bool}}
+
{{dcl list template | cpp/container/dcl list const_reference | vector_bool}}
{{dcl list template | cpp/container/tdcl list pointer | vector_bool}}
+
{{dcl list template | cpp/container/dcl list pointer | vector_bool}}
{{dcl list template | cpp/container/tdcl list const_pointer | vector_bool}}
+
{{dcl list template | cpp/container/dcl list const_pointer | vector_bool}}
{{dcl list template | cpp/container/tdcl list iterator | vector_bool}}
+
{{dcl list template | cpp/container/dcl list iterator | vector_bool}}
{{dcl list template | cpp/container/tdcl list const_iterator | vector_bool}}
+
{{dcl list template | cpp/container/dcl list const_iterator | vector_bool}}
{{dcl list template | cpp/container/tdcl list reverse_iterator | vector_bool}}
+
{{dcl list template | cpp/container/dcl list reverse_iterator | vector_bool}}
{{dcl list template | cpp/container/tdcl list const_reverse_iterator | vector_bool}}
+
{{dcl list template | cpp/container/dcl list const_reverse_iterator | vector_bool}}
 
{{dcl list end}}
 
{{dcl list end}}
  

Revision as of 02:07, 12 June 2012

Template:cpp/container/vector bool/sidebar

Defined in header <vector>
template<class Allocator = std::allocator<bool>>
class vector<bool, Allocator>;

std::vector<bool> is a space-efficient specialization of std::vector for the type bool.

It behaves similarly to std::vector, but in order to be space efficient, std::vector<bool>:

  • Does not necessarily store its data in a single contiguous chunk of memory.
  • Exposes std::vector<bool>::reference as a method of accessing individual bits.
  • Does not use std::allocator_traits::construct to construct bit values.

Contents

Member types

Template:cpp/container/dcl list value typeTemplate:cpp/container/dcl list allocator typeTemplate:cpp/container/dcl list size typeTemplate:cpp/container/dcl list difference typeTemplate:cpp/container/dcl list const referenceTemplate:cpp/container/dcl list pointerTemplate:cpp/container/dcl list const pointerTemplate:cpp/container/dcl list iteratorTemplate:cpp/container/dcl list const iteratorTemplate:cpp/container/dcl list reverse iteratorTemplate:cpp/container/dcl list const reverse iterator
Member type Definition
proxy class representing a reference to a single bool
(class)

Member functions

Template:cpp/container/dcl list constructorTemplate:cpp/container/dcl list destructorTemplate:cpp/container/dcl list operator=Template:cpp/container/dcl list assignTemplate:cpp/container/dcl list get allocatorTemplate:cpp/container/dcl list atTemplate:cpp/container/dcl list operator atTemplate:cpp/container/dcl list frontTemplate:cpp/container/dcl list backTemplate:cpp/container/dcl list dataTemplate:cpp/container/dcl list beginTemplate:cpp/container/dcl list endTemplate:cpp/container/dcl list rbeginTemplate:cpp/container/dcl list rendTemplate:cpp/container/dcl list emptyTemplate:cpp/container/dcl list sizeTemplate:cpp/container/dcl list max sizeTemplate:cpp/container/dcl list reserveTemplate:cpp/container/dcl list capacityTemplate:cpp/container/dcl list shrink to fitTemplate:cpp/container/dcl list clearTemplate:cpp/container/dcl list insertTemplate:cpp/container/dcl list emplaceTemplate:cpp/container/dcl list eraseTemplate:cpp/container/dcl list push backTemplate:cpp/container/dcl list emplace backTemplate:cpp/container/dcl list pop backTemplate:cpp/container/dcl list resizeTemplate:cpp/container/dcl list swapTemplate:cpp/container/vector bool/dcl list flipTemplate:cpp/container/vector bool/dcl list swap
Element access
Iterators
Capacity
Modifiers
vector<bool> specific modifiers

Non-member functions

Template:cpp/container/dcl list operator cmpTemplate:cpp/container/dcl list swap2