xtd
1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
xtd.core
include
xtd
any_cast.hpp
Go to the documentation of this file.
1
3
#pragma once
4
#include "
any.hpp
"
5
7
namespace
xtd
{
21
template
<
typename
type_t>
22
[[nodiscard]]
auto
any_cast
(
const
xtd::any
& operand) -> type_t {
23
return
std::any_cast<type_t>(operand);
24
}
25
38
template
<
typename
type_t>
39
[[nodiscard]]
auto
any_cast
(
xtd::any
& operand) -> type_t {
40
return
std::any_cast<type_t>(operand);
41
}
42
55
template
<
typename
type_t>
56
[[nodiscard]]
auto
any_cast
(
xtd::any
&& operand) -> type_t {
57
return
std::any_cast<type_t>(operand);
58
}
59
73
template
<
typename
type_t>
74
[[nodiscard]]
auto
any_cast
(
xtd::any
* operand) -> type_t* {
75
return
std::any_cast<type_t>(operand);
76
}
77
91
template
<
typename
type_t>
92
[[nodiscard]]
auto
any_cast
(
const
xtd::any
* operand) -> type_t* {
93
return
std::any_cast<type_t>(operand);
94
}
95
}
any.hpp
Contains xtd::any type and std::bad_any_cast exception.
xtd::any
std::any any
Represents the any alias on std::any.
Definition
any.hpp:24
xtd::any_cast
auto any_cast(const xtd::any &operand) -> type_t
Performs type-safe access to the contained object.
Definition
any_cast.hpp:22
xtd
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition
abstract_object.hpp:8
Generated on
for xtd by
Gammasoft
. All rights reserved.