Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
|
Delegated target function object, providing a fast path target function invocation. More...
#include <functional.hpp>
Public Types | |
typedef int32_t | size_type |
Utilize a reduced size type of int32_t. More... | |
Public Member Functions | |
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... | |
Static Public Member Functions | |
static delegate_t | make (invocation_t cb_, equal_op_t eqop_) noexcept |
Public Attributes | |
nt | copy_ctor |
nt | move_ctor |
return | target |
Protected Types | |
typedef bool(* | equal_op_t) (const delegate_t &data_lhs, const delegate_t &data_rhs) noexcept |
typedef R(* | invocation_t) (delegate_t *__restrict_cxx__ const data, A... args) |
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.
TriviallyCopyable
target function objectsR | function return type |
A | function arguments |
Definition at line 377 of file functional.hpp.
typedef int32_t jau::func::delegate_t< R, A >::size_type |
Utilize a reduced size type of int32_t.
Negative sign indicates limited 24 bytes cache usage, otherwise heap is being used.
Definition at line 383 of file functional.hpp.
|
protected |
Definition at line 386 of file functional.hpp.
|
protectednoexcept |
Definition at line 387 of file functional.hpp.
|
inlinenoexcept |
Definition at line 520 of file functional.hpp.
|
inlinenoexcept |
Definition at line 522 of file functional.hpp.
|
inlinenoexcept |
Definition at line 549 of file functional.hpp.
|
inlinestaticnoexcept |
Definition at line 475 of file functional.hpp.
template jau::func::delegate_t< R, A >::data | ( | ) |
|
inline |
Definition at line 505 of file functional.hpp.
delegate_t jau::func::delegate_t< R, A >::target | ( | type_ | , |
static_cast< size_type > | sizeof(T), | ||
nt | , | ||
cb_ | , | ||
eqop_ | |||
) |
jau::func::delegate_t< R, A >::new | ( | target.template data< T > | () | ) |
|
inlinenoexcept |
Definition at line 575 of file functional.hpp.
|
inlinenoexcept |
Definition at line 637 of file functional.hpp.
|
inlineconstexprnoexcept |
Definition at line 684 of file functional.hpp.
|
inlineconstexprnoexcept |
Definition at line 700 of file functional.hpp.
|
inlineconstexpr |
Delegated fast path target function invocation, see above.
args | target function arguments |
Definition at line 710 of file functional.hpp.
|
inlineconstexprnoexcept |
Delegated fast path target function equality operator.
rhs |
Definition at line 720 of file functional.hpp.
|
inlineconstexprnoexcept |
Returns true if the underlying target function is TriviallyCopyable
.
Definition at line 725 of file functional.hpp.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Definition at line 728 of file functional.hpp.
|
inlineconstexprnoexcept |
Returns the size of underlying target function.
Definition at line 731 of file functional.hpp.
|
inlineconstexprnoexcept |
Return the func::target_type of this invocation function wrapper.
Definition at line 734 of file functional.hpp.
nt jau::func::delegate_t< R, A >::copy_ctor |
Definition at line 509 of file functional.hpp.
nt jau::func::delegate_t< R, A >::move_ctor |
Definition at line 512 of file functional.hpp.
return jau::func::delegate_t< R, A >::target |
Definition at line 517 of file functional.hpp.