xtd
1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
xtd.core
include
xtd
overload.hpp
Go to the documentation of this file.
1
4
#pragma once
5
#include "
const_overload.hpp
"
6
#include "
non_const_overload.hpp
"
7
9
namespace
xtd
{
14
template
<
typename
...args_t>
15
struct
overload_type
:
const_overload_type
<args_t...>,
non_const_overload_type
<args_t...> {
17
using
const_overload_type
<args_t...>
::of
;
18
using
const_overload_type
<args_t...>::operator();
19
using
non_const_overload_type
<args_t...>
::of
;
20
using
non_const_overload_type
<args_t...>::operator();
22
24
29
template
<
typename
result_t>
30
constexpr
auto
operator()
(result_t (*method)(args_t...)) const noexcept -> decltype(method) {
return
method;}
32
34
39
template
<
typename
result_t>
40
static
constexpr
auto
of
(result_t (*method)(args_t...)) noexcept -> decltype(method) {
return
method;}
42
};
43
45
47
template
<
typename
...args_t>
48
inline
constexpr
overload_type<args_t...> overload;
50
}
51
58
#define overload_ xtd::overload
const_overload.hpp
Contains xtd::const_overload.
xtd
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition
abstract_object.hpp:8
non_const_overload.hpp
Contains xtd::non_const_overload.
xtd::const_overload_type
Represents class that use to determine one of const overloaded methods.
Definition
const_overload.hpp:14
xtd::non_const_overload_type
Represents class that use to determine one of non const overloaded methods.
Definition
non_const_overload.hpp:16
xtd::overload_type
Represents class that use to determine one of const and non const overloaded methods.
Definition
overload.hpp:15
xtd::overload_type::operator()
constexpr auto operator()(result_t(*method)(args_t...)) const noexcept -> decltype(method)
Returns a pointer to an overloaded method. The template parameter is the list of the argument types o...
Definition
overload.hpp:30
xtd::overload_type::of
static constexpr auto of(result_t(*method)(args_t...)) noexcept -> decltype(method)
Returns a pointer to an overloaded method. The template parameter is the list of the argument types o...
Definition
overload.hpp:40
Generated on
for xtd by
Gammasoft
. All rights reserved.