std::make_any
From cppreference.com
template< class T, class... Args > std::any make_any( Args&&... args ); |
(1) | (since C++17) |
template< class U, class T, class... Args > std::any make_any( std::initializer_list<U> il, Args&&... args ); |
(2) | (since C++17) |
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<T>, std::forward<Args>(args)...);
2) Equivalent to return std::any(std::in_place<T>, il, std::forward<Args>(args)...);
See also
constructs an any object (public member function) |