Specialization of vector for elements of type bool.
More...
#include <geogram/basic/memory.h>
Specialization of vector for elements of type bool.
This specialization uses std::vector<bool> directly without memory alignment.
- See also
- vector
Definition at line 892 of file memory.h.
◆ vector() [1/6]
Creates an empty vector.
Definition at line 897 of file memory.h.
◆ vector() [2/6]
Creates a pre-allocated vector.
Constructs a container with size elements. Each element is default-constructed.
- Parameters
-
| [in] | size | Number of elements to allocate |
Definition at line 902 of file memory.h.
◆ vector() [3/6]
Creates a pre-initialized vector.
Constructs a container with size elements. Each element is a copy of val.
- Parameters
-
| [in] | size | Number of elements to allocate |
| [in] | val | Initial value of the elements |
Definition at line 907 of file memory.h.
◆ vector() [4/6]
Creates an empty vector.
Definition at line 720 of file memory.h.
◆ vector() [5/6]
Creates a pre-allocated vector.
Constructs a container with size elements. Each element is default-constructed.
- Parameters
-
| [in] | size | Number of elements to allocate |
Definition at line 730 of file memory.h.
◆ vector() [6/6]
Creates a pre-initialized vector.
Constructs a container with size elements. Each element is a copy of val.
- Parameters
-
| [in] | size | Number of elements to allocate |
| [in] | val | Initial value of the elements |
Definition at line 741 of file memory.h.
◆ clear_and_deallocate()
Resizes this vector to zero and deallocated all the memory.
clear() does not deallocate.
Definition at line 879 of file memory.h.
◆ data() [1/2]
Gets a pointer to the array of elements.
- Returns
- a pointer to the first element of the vector
Definition at line 849 of file memory.h.
◆ data() [2/2]
Gets a pointer to the array of elements.
- Returns
- a const pointer to the first element of the vector
Definition at line 863 of file memory.h.
◆ operator[]() [1/4]
Gets a vector element.
- Parameters
-
| [in] | i | index of the element |
- Returns
- A reference to the element at position
i in the vector.
Definition at line 762 of file memory.h.
◆ operator[]() [2/4]
Gets a vector element.
- Parameters
-
| [in] | i | index of the element |
- Returns
- A const reference to the element at position
i in the vector.
Definition at line 773 of file memory.h.
◆ operator[]() [3/4]
Gets a vector element.
- Parameters
-
| [in] | i | index of the element |
- Returns
- A reference to the element at position
i in the vector.
Definition at line 783 of file memory.h.
◆ operator[]() [4/4]
Gets a vector element.
- Parameters
-
| [in] | i | index of the element |
- Returns
- A const reference to the element at position
i in the vector.
Definition at line 794 of file memory.h.
◆ size() [1/2]
Gets the number of elements.
- Returns
- The actual number of elements in the vector
Definition at line 912 of file memory.h.
◆ size() [2/2]
Gets the number of elements.
- Returns
- The actual number of elements in the vector
Definition at line 749 of file memory.h.
The documentation for this class was generated from the following file: