Delegated target function object, providing a fast path target function invocation.
More...
|
| delegate_t (const delegate_t &o) noexcept |
|
| delegate_t (delegate_t &&o) noexcept |
|
| ~delegate_t () noexcept |
|
constexpr size_t | cached_size () const noexcept |
|
template<typename T , typename... P> |
template | data () |
|
template<typename T , std::enable_if_t< std::is_trivially_copyable_v< T > &&sizeof(udata.cache) > = sizeof(T), bool > |
std::enable_if_t<!std::is_trivially_copyable_v< T >||sizeof(udata.cache)< sizeof(T), bool >=true > constexpr const T * | data () const noexcept |
|
template<typename T , std::enable_if_t< std::is_trivially_copyable_v< T > &&sizeof(udata.cache) > = sizeof(T), bool > |
std::enable_if_t<!std::is_trivially_copyable_v< T >||sizeof(udata.cache)< sizeof(T), bool >=true > constexpr T * | data () noexcept |
|
constexpr size_t | heap_size () const noexcept |
|
| if (nullptr !=t) |
|
constexpr bool | is_trivially_copyable () const noexcept |
| Returns true if the underlying target function is TriviallyCopyable . More...
|
|
| new (target.template data< T >()) T(params...) |
|
constexpr R | operator() (A... args) const |
| Delegated fast path target function invocation, see above. More...
|
|
delegate_t & | operator= (const delegate_t &o) noexcept |
|
delegate_t & | operator= (delegate_t &&o) noexcept |
|
constexpr bool | operator== (const delegate_t< R, A... > &rhs) const noexcept |
| Delegated fast path target function equality operator. More...
|
|
delegate_t | target (type_, static_cast< size_type >(sizeof(T)), nt, cb_, eqop_) |
|
constexpr size_t | target_size () const noexcept |
| Returns the size of underlying target function. More...
|
|
constexpr target_type | type () const noexcept |
| Return the func::target_type of this invocation function wrapper. More...
|
|
template<typename R, typename... A>
class jau::func::delegate_t< R, A >
Delegated target function object, providing a fast path target function invocation.
This static polymorphic target function delegate_t<R, A...> is contained by function<R(A...)> and completely holds up to 24 bytes sized TriviallyCopyable
target function objects to avoiding cache misses.
- contained within function<R(A...)> instance as a member
- avoiding need for dynamic polymorphism, i.e. heap allocated specialization referenced by base type
- using non-heap cache for up to 24 bytes sized
TriviallyCopyable
target function objects
- enhancing performance on most target function types by avoiding cache misses
- not using virtual function table indirection
- utilize constexpr inline for function invocation (callbacks)
- Template Parameters
-
R | function return type |
A | function arguments |
- See also
- Function Overview
Definition at line 377 of file functional.hpp.