xtd 0.2.0
Loading...
Searching...
No Matches
const_overload.hpp
Go to the documentation of this file.
1
4#pragma once
5#include <functional>
6
8namespace xtd {
13 template<typename ...args_t>
16
21 template<typename result_t, typename type_t>
22 constexpr auto operator()(result_t (type_t::*method)(args_t...) const) const noexcept -> decltype(method) {return method;}
24
26
31 template<typename result_t, typename type_t>
32 static constexpr auto of(result_t (type_t::*method)(args_t...) const) noexcept -> decltype(method) {return method;}
34 };
35
37
39 template<typename ...args_t>
40 inline constexpr const_overload_type<args_t...> const_overload;
42}
43
50#define const_overload_ xtd::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 const overloaded methods.
Definition const_overload.hpp:14
constexpr auto operator()(result_t(type_t::*method)(args_t...) const) const noexcept -> decltype(method)
Returns a pointer to an overloaded method. The template parameter is the list of the argument types o...
Definition const_overload.hpp:22
static constexpr auto of(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 const_overload.hpp:32