18 #ifndef IOX_UTILS_CXX_FUNCTION_REF_HPP
19 #define IOX_UTILS_CXX_FUNCTION_REF_HPP
21 #include "iceoryx_utils/cxx/type_traits.hpp"
31 template <
typename SignatureType>
34 template <
typename...>
39 template <
typename... Targs>
67 template <
class ReturnType,
class... ArgTypes>
70 using SignatureType = ReturnType(ArgTypes...);
85 template <
typename CallableType,
86 typename = std::enable_if_t<!is_function_ref<std::remove_reference_t<CallableType>>::value>,
87 typename = std::enable_if_t<
is_invocable<CallableType, ArgTypes...>::value>>
97 ReturnType operator()(ArgTypes... args)
const noexcept;
101 explicit operator bool()
const noexcept;
108 void* m_pointerToCallable{
nullptr};
109 ReturnType (*m_functionPointer)(
void*, ArgTypes...){
nullptr};
115 #include "iceoryx_utils/internal/cxx/function_ref.inl"
Definition: function_ref.hpp:32
building block to easily create free function for logging in a library context
Definition: lockfree_queue.hpp:28
Definition: function_ref.hpp:36
Verifies whether the passed Callable type is in fact invocable with the given arguments.
Definition: type_traits.hpp:53