std::make_any
STD:使[医]任何
template< class T, class... Args > std::any make_any( Args&&... args | (1) | (since C++17) |
---|---|---|
template< class T, class U, class... Args > std::any make_any( std::initializer_list<U> il, Args&&... args | (2) | (since C++17) |
构造一个any
包含类型对象的T
,将提供的参数传递给T
%27s构造函数
1%29相当于returnstd::any(std::in_place_type<T>,std::forward<Args>(args)...
2%29相当于returnstd::any(std::in_place_type<T>, il,std::forward<Args>(args)...
另见
(constructor) | constructs an any object (public member function) |
---|
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。