tlx
Loading...
Searching...
No Matches
delegate.hpp File Reference
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <memory>
#include <type_traits>
#include <utility>

Go to the source code of this file.

Classes

class  Delegate< R(A...), Allocator >
 This is a faster replacement than std::function. More...
struct  Delegate< R(A...), Allocator >::IsMemberPair< typename >
 template for class::function selector More...
struct  Delegate< R(A...), Allocator >::IsMemberPair< MemberPair< C > >
 specialization for class::function selector More...
struct  Delegate< R(A...), Allocator >::IsConstMemberPair< typename >
 template for const class::function selector More...
struct  Delegate< R(A...), Allocator >::IsConstMemberPair< ConstMemberPair< C > >
 specialization for const class::function selector More...

Namespaces

namespace  tlx

Typedefs

template<typename T, typename Allocator = std::allocator<void>>
using delegate
 make template alias due to similarity with std::function

Functions

template<class C, typename R, typename... A>
Delegate< R(A...)> make_delegate (C *const object_ptr, R(C::*const method_ptr)(A...)) noexcept
 constructor for wrapping a class::method with object pointer.
template<class C, typename R, typename... A>
Delegate< R(A...)> make_delegate (C &object_ptr, R(C::*const method_ptr)(A...)) noexcept
 constructor for wrapping a class::method with object reference.
template<class C, typename R, typename... A>
Delegate< R(A...)> make_delegate (C const &object_ptr, R(C::*const method_ptr)(A...) const) noexcept
 constructor for wrapping a const class::method with object reference.