xtd 0.2.0
make_any.hpp
Go to the documentation of this file.
1
3#pragma once
4#include "any.hpp"
5
7namespace xtd {
20 template<class type_t, class... args_t>
21 xtd::any make_any(args_t&&... args) {
22 return std::make_any<type_t>(std::forward<args_t>(args)...);
23 }
24
38 template<class type_t, class il_type_t, class... args_t>
39 xtd::any make_any(std::initializer_list<il_type_t> il, args_t&&... args) {
40 return std::make_any<type_t>(il, std::forward<args_t>(args)...);
41 }
42}
Contains xtd::any type and std::bad_any_cast exception.
std::any any
Represents the any alias on std::any.
Definition any.hpp:24
xtd::any make_any(args_t &&... args)
Creates an xtd::any object containing an object of type type_t, passing the provided arguments to typ...
Definition make_any.hpp:21
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8