#include <functional>
#include <initializer_list>
#include <optional>
#include <type_traits>
#include <utility>
#include <vector>
Go to the source code of this file.
|
template<typename... Args> |
std::vector< typename std::common_type< Args... >::type > | Vector (Args &&... args) |
| Construct a vector with the specified elements. More...
|
|
template<typename V > |
V | Cat (V v1, V &&v2) |
| Concatenate two vectors, moving elements. More...
|
|
template<typename V > |
V | Cat (V v1, const V &v2) |
| Concatenate two vectors. More...
|
|
template<typename V > |
void | ClearShrink (V &v) noexcept |
| Clear a vector (or std::deque) and release its allocated memory. More...
|
|
template<typename V , typename L > |
std::optional< V > | FindFirst (const std::vector< V > &vec, const L fnc) |
|
◆ Cat() [1/2]
template<typename V >
V Cat |
( |
V |
v1, |
|
|
const V & |
v2 |
|
) |
| |
|
inline |
Concatenate two vectors.
Definition at line 45 of file vector.h.
◆ Cat() [2/2]
Concatenate two vectors, moving elements.
Definition at line 34 of file vector.h.
◆ ClearShrink()
template<typename V >
void ClearShrink |
( |
V & |
v | ) |
|
|
inlinenoexcept |
Clear a vector (or std::deque) and release its allocated memory.
Definition at line 56 of file vector.h.
◆ FindFirst()
template<typename V , typename L >
std::optional< V > FindFirst |
( |
const std::vector< V > & |
vec, |
|
|
const L |
fnc |
|
) |
| |
|
inline |
◆ Vector()
template<typename... Args>
std::vector< typename std::common_type< Args... >::type > Vector |
( |
Args &&... |
args | ) |
|
|
inline |
Construct a vector with the specified elements.
This is preferable over the list initializing constructor of std::vector:
- It automatically infers the element type from its arguments.
- If any arguments are rvalue references, they will be moved into the vector (list initialization always copies).
Definition at line 23 of file vector.h.