std::make_any (3) - Linux Man Pages

std::make_any: std::make_any

NAME

std::make_any - std::make_any

Synopsis


template< class T, class... Args > (1) (since C++17)
std::any make_any( Args&&... args );
template< class T, class U, class... Args > (2) (since C++17)
std::any make_any( std::initializer_list<U> il, Args&&... args );


Constructs an any object containing an object of type T, passing the provided arguments to T's constructor.
1) Equivalent to return std::any(std::in_place_type<T>, std::forward<Args>(args)...);
2) Equivalent to return std::any(std::in_place_type<T>, il, std::forward<Args>(args)...);

See also


              constructs an any object
constructor (public member function)