std::make_from_tuple (3) - Linux Manuals
std::make_from_tuple: std::make_from_tuple
NAME
std::make_from_tuple - std::make_from_tuple
Synopsis
Defined in header <tuple>
template <class T, class Tuple> (since C++17)
constexpr T make_from_tuple(Tuple&& t);
Construct an object of type T, using the elements of the tuple t as the arguments to the constructor.
Parameters
t - tuple whose elements to be used as arguments to the constructor of T
Return value
The constructed T object.
Notes
The tuple need not be std::tuple, and instead may be anything that supports std::get and std::tuple_size; in particular, std::array and std::pair may be used.
Due to guaranteed_copy_elision, T need not be movable.
Possible implementation
Example
// Run this code
Output:
See also
make_tuple (function template)
forward_as_tuple (function template)
apply calls a function with a tuple of arguments
(C++17)