Geogram  Version 1.9.1-rc
A programming library of geometric algorithms
GEO::vector< bool > Class Reference

Specialization of vector for elements of type bool. More...

#include <geogram/basic/memory.h>

Inheritance diagram for GEO::vector< bool >:

Public Member Functions

 vector ()
 Creates an empty vector. More...
 
 vector (index_t size)
 Creates a pre-allocated vector. More...
 
 vector (index_t size, bool val)
 Creates a pre-initialized vector. More...
 
index_t size () const
 Gets the number of elements. More...
 

Detailed Description

Specialization of vector for elements of type bool.

This specialization uses std::vector<bool> directly without memory alignment.

See also
vector

Definition at line 795 of file memory.h.

Constructor & Destructor Documentation

◆ vector() [1/3]

GEO::vector< bool >::vector ( )
inline

Creates an empty vector.

Definition at line 800 of file memory.h.

◆ vector() [2/3]

GEO::vector< bool >::vector ( index_t  size)
inlineexplicit

Creates a pre-allocated vector.

Constructs a container with size elements. Each element is default-constructed.

Parameters
[in]sizeNumber of elements to allocate

Definition at line 805 of file memory.h.

◆ vector() [3/3]

GEO::vector< bool >::vector ( index_t  size,
bool  val 
)
inlineexplicit

Creates a pre-initialized vector.

Constructs a container with size elements. Each element is a copy of val.

Parameters
[in]sizeNumber of elements to allocate
[in]valInitial value of the elements

Definition at line 810 of file memory.h.

Member Function Documentation

◆ size()

index_t GEO::vector< bool >::size ( ) const
inline

Gets the number of elements.

Returns
The actual number of elements in the vector

Definition at line 815 of file memory.h.


The documentation for this class was generated from the following file: