|
|
| delegate (delegate const &)=default |
|
| delegate (delegate &&)=default |
| | delegate (::std::nullptr_t const) noexcept |
| template<class C, typename = typename ::std::enable_if<::std::is_class<C>{}>::type> |
| | delegate (C const *const o) noexcept |
| template<class C, typename = typename ::std::enable_if<::std::is_class<C>{}>::type> |
| | delegate (C const &o) noexcept |
| template<class C> |
| | delegate (C *const object_ptr, R(C::*const method_ptr)(A...)) |
| template<class C> |
| | delegate (C *const object_ptr, R(C::*const method_ptr)(A...) const) |
| template<class C> |
| | delegate (C &object, R(C::*const method_ptr)(A...)) |
| template<class C> |
| | delegate (C const &object, R(C::*const method_ptr)(A...) const) |
| template<typename T, typename = typename ::std::enable_if<!::std::is_same<delegate, typename ::std::decay<T>::type>{}>::type> |
| | delegate (T &&f) |
|
delegate & | operator= (delegate const &)=default |
|
delegate & | operator= (delegate &&)=default |
| template<class C> |
| delegate & | operator= (R(C::*const rhs)(A...)) |
| template<class C> |
| delegate & | operator= (R(C::*const rhs)(A...) const) |
| template<typename T, typename = typename ::std::enable_if<!::std::is_same<delegate, typename ::std::decay<T>::type>{}>::type> |
| delegate & | operator= (T &&f) |
| void | reset () |
| void | reset_stub () noexcept |
| void | swap (delegate &other) noexcept |
| bool | operator== (delegate const &rhs) const noexcept |
| bool | operator!= (delegate const &rhs) const noexcept |
| bool | operator< (delegate const &rhs) const noexcept |
| bool | operator== (::std::nullptr_t const) const noexcept |
| bool | operator!= (::std::nullptr_t const) const noexcept |
| | operator bool () const noexcept |
| R | operator() (A... args) const |
|
| template<R(*)(A...) function_ptr> |
| static delegate | from () noexcept |
| template<class C, R(C::*)(A...) method_ptr> |
| static delegate | from (C *const object_ptr) noexcept |
| template<class C, R(C::*)(A...) const method_ptr> |
| static delegate | from (C const *const object_ptr) noexcept |
| template<class C, R(C::*)(A...) method_ptr> |
| static delegate | from (C &object) noexcept |
| template<class C, R(C::*)(A...) const method_ptr> |
| static delegate | from (C const &object) noexcept |
| template<typename T> |
| static delegate | from (T &&f) |
| static delegate | from (R(*const function_ptr)(A...)) |
| template<class C> |
| static delegate | from (C *const object_ptr, R(C::*const method_ptr)(A...)) |
| template<class C> |
| static delegate | from (C const *const object_ptr, R(C::*const method_ptr)(A...) const) |
| template<class C> |
| static delegate | from (C &object, R(C::*const method_ptr)(A...)) |
| template<class C> |
| static delegate | from (C const &object, R(C::*const method_ptr)(A...) const) |
template<class R, class... A>
class util::delegate< R(A...)>
A fast alternative to std::function with improved performance.
The delegate class is a template class that allows to call functions, member functions, and lambda expressions as delegates. It does not provide ownership handling and lifetime management. The using function needs to make sure that the object and method pointers are valid.
- Template Parameters
-
| R | The return type of the delegate. |
| A | The argument types of the delegate. |
Definition at line 49 of file delegate.h.