Skip to content

Latest commit

 

History

History
51 lines (39 loc) · 1.02 KB

File metadata and controls

51 lines (39 loc) · 1.02 KB
description Learn more about: <any> functions
title <any> functions
ms.date 04/04/2019
f1_keywords
any/std::any_cast
any/std::make_any
any/std::swap

<any> functions

any_cast

Makes an object into an any.

template<class T>
    T any_cast(const any& operand);
template<class T>
    T any_cast(any& operand);
template<class T>
    T any_cast(any&& operand);
template<class T>
    const T* any_cast(const any* operand) noexcept;
template<class T>
    T* any_cast(any* operand) noexcept;

make_any

Takes values and creates an any object.

template <class T, class... Args>
    any make_any(Args&& ...args);
template <class T, class U, class... Args>
    any make_any(initializer_list<U> il, Args&& ...args);

swap

Exchanges the elements of two objects any.

void swap(any& left, any& right) noexcept;

Parameters

left
An object of type any.

right
An object of type any.