12#ifndef A_UTIL_SYSTEM_ADDRESS_INFO_HEADER_INCLUDED
13#define A_UTIL_SYSTEM_ADDRESS_INFO_HEADER_INCLUDED
28#if ((defined _MSC_VER) && (_MSVC_LANG >= 201510L)) || (__cplusplus >= 201510L)
35 template <
typename ReturnType,
typename... Args>
36 explicit AddressInfo(ReturnType (*
const function)(Args...)
noexcept) noexcept
37 : _address{toDataPointer(function)}
45 template <
typename ReturnType,
typename... Args>
46 explicit AddressInfo(ReturnType (*
const function)(Args...)) noexcept
47 : _address{toDataPointer(function)}
56 explicit AddressInfo(
const T& variable) noexcept : _address(&variable)
58 static_assert(!std::is_function<T>::value,
59 "ERROR: CTOR for data pointer is called with function pointer");
81 template <
typename Return,
typename... Args>
82 const_handle_t toDataPointer(Return (*
const function)(Args...)) noexcept
91 return *
static_cast<void* const*
>(
94 static_cast<const void*
>(
98 &
static_cast<Return (*const&)(Args...)
>(function)));
filesystem::Path getFilePath() const
AddressInfo(const T &variable) noexcept
Definition address_info.h:56
AddressInfo(ReturnType(*const function)(Args...)) noexcept
Definition address_info.h:46
const void * const_handle_t
Type of a const handle value.
Definition types.h:29
Serves as component for portable OS (Windows, Linux, ...) functionality.
Definition system.h:20
Serves as the root component, with common functionality documented in core functionality.
Definition base.h:24