![]() |
Bitcoin Core
0.21.1
P2P Digital Currency
|
Implements a drop-in replacement for std::vector<T> which stores up to N elements directly (without heap allocation). More...
#include <prevector.h>
Classes | |
| class | const_iterator |
| class | const_reverse_iterator |
| union | direct_or_indirect |
| class | iterator |
| class | reverse_iterator |
Public Types | |
| typedef Size | size_type |
| typedef Diff | difference_type |
| typedef T | value_type |
| typedef value_type & | reference |
| typedef const value_type & | const_reference |
| typedef value_type * | pointer |
| typedef const value_type * | const_pointer |
Private Attributes | |
| direct_or_indirect | _union = {} |
| size_type | _size = 0 |
Implements a drop-in replacement for std::vector<T> which stores up to N elements directly (without heap allocation).
The types Size and Diff are used to store element counts, and can be any unsigned + signed type.
Storage layout is either:
The data type T must be movable by memmove/realloc(). Once we switch to C++, move constructors can be used instead.
Definition at line 37 of file prevector.h.
| typedef const value_type* prevector< N, T, Size, Diff >::const_pointer |
Definition at line 45 of file prevector.h.
| typedef const value_type& prevector< N, T, Size, Diff >::const_reference |
Definition at line 43 of file prevector.h.
| typedef Diff prevector< N, T, Size, Diff >::difference_type |
Definition at line 40 of file prevector.h.
| typedef value_type* prevector< N, T, Size, Diff >::pointer |
Definition at line 44 of file prevector.h.
| typedef value_type& prevector< N, T, Size, Diff >::reference |
Definition at line 42 of file prevector.h.
| typedef Size prevector< N, T, Size, Diff >::size_type |
Definition at line 39 of file prevector.h.
| typedef T prevector< N, T, Size, Diff >::value_type |
Definition at line 41 of file prevector.h.
|
private |
Definition at line 159 of file prevector.h.
|
private |
Definition at line 158 of file prevector.h.
1.8.8