std::variant::emplace

std::variant::emplace

template <class T, class... Args>
T& emplace(Args&&... args);
(1) (since C++17)
template <class T, class U, class... Args>
T& emplace(std::initializer_list<U> il, Args&&... args);
(2) (since C++17)
template <size_t I, class... Args>
std::variant_alternative_t<I, variant>& emplace(Args&&... args);
(3) (since C++17)
登录查看完整内容