Utilities for memory. More...
#include <Memory.hpp>
Static Public Member Functions | |
template<typename T , typename R = T, typename F , typename ... P> | |
static std::vector< std::shared_ptr< R > > | makeShared (F transform, const T &first, const P &... remaining) |
Create a vector of shared pointers after transforming the arguments (scalar transform version). More... | |
template<typename T , typename R = T, typename F > | |
static std::vector< std::shared_ptr< R > > | makeShared (F) |
[End case] Create a vector of shared pointers after transforming the arguments (scalar transform version). More... | |
template<typename T , typename R = T, typename F , typename ... P> | |
static std::vector< std::shared_ptr< R > > | makeSharedV (F transform, const T &first, const P &... remaining) |
Create a vector of shared pointers after transforming the arguments (vector transform version). More... | |
template<typename T , typename R = T, typename F > | |
static std::vector< std::shared_ptr< R > > | makeSharedV (F) |
[End case] Create a vector of shared pointers after transforming the arguments (vector transform version). More... | |
template<typename T , typename R = T, typename F , typename ... P> | |
static std::vector< std::unique_ptr< R > > | makeUnique (F transform, const T &first, const P &... remaining) |
Create a vector of unique pointers after transforming the arguments (scalar transform version). More... | |
template<typename T , typename R = T, typename F > | |
static std::vector< std::unique_ptr< R > > | makeUnique (F) |
[End case] Create a vector of unique pointers after transforming the arguments (scalar transform version). More... | |
template<typename T , typename R = T, typename F , typename ... P> | |
static std::vector< std::unique_ptr< R > > | makeUniqueV (F transform, const T &first, const P &... remaining) |
Create a vector of unique pointers after transforming the arguments (vector transform version). More... | |
template<typename T , typename R = T, typename F > | |
static std::vector< std::shared_ptr< R > > | makeUniqueV (F) |
[End case] Create a vector of unique pointers after transforming the arguments (vector transform version). More... | |
Utilities for memory.
|
inlinestatic |
Create a vector of shared pointers after transforming the arguments (scalar transform version).
Given the variadic input reference arguments, create a vector of shared pointers after transforming the arguments via the supplied function.
T | the common base type of the input arguments |
R | the return type of which the vector will hold shared pointers |
P | types of the remaining arguments, compatible with the base type T |
transform | the transform function called during emplacement |
first | the first argument to emplace |
remaining | the remaining arguments to emplace |
|
inlinestatic |
[End case] Create a vector of shared pointers after transforming the arguments (scalar transform version).
Given no variadic input references, create an empty shared pointer vector.
T | the common base type of the input arguments |
R | the return type of which the vector will hold shared pointers |
|
inlinestatic |
Create a vector of shared pointers after transforming the arguments (vector transform version).
Given the variadic input reference arguments, create a vector of shared pointers after transforming the arguments via the supplied function into a vector.
T | the common base type of the input arguments |
R | the return type of which the vector will hold shared pointers |
P | types of the remaining arguments, compatible with the base type T |
transform | the scalar to vector transform function called during emplacement |
first | the first argument to emplace |
remaining | the remaining arguments to emplace |
|
inlinestatic |
[End case] Create a vector of shared pointers after transforming the arguments (vector transform version).
Given no variadic input references, create an empty shared pointer vector.
T | the common base type of the input arguments |
R | the return type of which the vector will hold shared pointers |
|
inlinestatic |
Create a vector of unique pointers after transforming the arguments (scalar transform version).
Given the variadic input reference arguments, create a vector of unique pointers after transforming the arguments via the supplied function.
T | the common base type of the input arguments |
R | the return type of which the vector will hold shared pointers |
P | types of the remaining arguments, compatible with the base type T |
transform | the transform function called during emplacement |
first | the first argument to emplace |
remaining | the remaining arguments to emplace |
|
inlinestatic |
[End case] Create a vector of unique pointers after transforming the arguments (scalar transform version).
Given no variadic input reference arguments, create an empty unique pointer vector.
T | the common base type of the input arguments |
R | the return type of which the vector will hold shared pointers |
|
inlinestatic |
Create a vector of unique pointers after transforming the arguments (vector transform version).
Given the variadic input reference arguments, create a vector of unique pointers after transforming the arguments via the supplied function into a vector.
T | the common base type of the input arguments |
R | the return type of which the vector will hold unique pointers |
P | types of the remaining arguments, compatible with the base type T |
transform | the scalar to vector transform function called during emplacement |
first | the first argument to emplace |
remaining | the remaining arguments to emplace |
|
inlinestatic |
[End case] Create a vector of unique pointers after transforming the arguments (vector transform version).
Given no variadic input references, create an empty shared pointer vector.
T | the common base type of the input arguments |
R | the return type of which the vector will hold shared pointers |