xtd 0.2.0
Loading...
Searching...
No Matches
non_const_overload.hpp
Go to the documentation of this file.
1
4#pragma once
5#include <functional>
6
8namespace xtd {
15 template<typename ...args_t>
18
23 template<typename result_t, typename type_t>
24 constexpr auto operator()(result_t (type_t::*method)(args_t...)) const noexcept -> decltype(method) {return method;}
26
28
33 template<typename result_t, typename type_t>
34 static constexpr auto of(result_t (type_t::*method)(args_t...)) noexcept -> decltype(method) {return method;}
36 };
37
39
41 template<typename ...args_t>
42 inline constexpr non_const_overload_type<args_t...> non_const_overload;
44}
45
52#define non_const_overload_ xtd::non_const_overload
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Represents class that use to determine one of non const overloaded methods.
Definition non_const_overload.hpp:16
static constexpr auto of(result_t(type_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 non_const_overload.hpp:34
constexpr auto operator()(result_t(type_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 non_const_overload.hpp:24