LeviLamina
Loading...
Searching...
No Matches
ll::data::AnyFunctionObj< Fn, Ret, Args > Class Template Reference
Inheritance diagram for ll::data::AnyFunctionObj< Fn, Ret, Args >:

Public Member Functions

template<class T>
constexpr AnyFunctionObj (T &&fn)
std::any invoke (std::span< std::any > args) override
AnyFunctionObjBasecopy (void *to) const override
AnyFunctionObjBasemove (void *to) noexcept override
void tidy () noexcept override

Static Public Member Functions

template<class F>
static constexpr AnyFunctionObjBaseconstruct (void *to, F &&f)

Static Public Attributes

static constexpr bool nothrowMove = std::is_nothrow_move_constructible_v<Fn>
static constexpr size_t anyFnSizeNumPtrs = 8
static constexpr size_t smallObjSize = ((anyFnSizeNumPtrs - 1) * sizeof(void*))

Static Protected Member Functions

template<class Arg>
static auto getArg (std::any &any) -> std::conditional_t< std::is_reference_v< Arg >, Arg, std::add_lvalue_reference_t< Arg > >
template<class Obj, class... Args>
static constexpr Obj * constructImpl (void *to, Args &&... args) noexcept(std::is_nothrow_constructible_v< Obj, Args... >)
template<class Obj>
static constexpr void destroyImpl (Obj *self) noexcept

Static Protected Attributes

template<class Obj>
static constexpr bool isLarge

Member Function Documentation

◆ invoke()

template<class Fn, class Ret, class... Args>
std::any ll::data::AnyFunctionObj< Fn, Ret, Args >::invoke ( std::span< std::any > args)
inlineoverridevirtual

◆ copy()

template<class Fn, class Ret, class... Args>
AnyFunctionObjBase * ll::data::AnyFunctionObj< Fn, Ret, Args >::copy ( void * to) const
inlineoverridevirtual

◆ move()

template<class Fn, class Ret, class... Args>
AnyFunctionObjBase * ll::data::AnyFunctionObj< Fn, Ret, Args >::move ( void * to)
inlineoverridevirtualnoexcept

◆ tidy()

template<class Fn, class Ret, class... Args>
void ll::data::AnyFunctionObj< Fn, Ret, Args >::tidy ( )
inlineoverridevirtualnoexcept

Member Data Documentation

◆ isLarge

template<class Obj>
bool ll::data::AnyObjBase::isLarge
staticconstexprprotectedinherited
Initial value:
= sizeof(Obj) > Obj::smallObjSize || alignof(Obj) > alignof(std::max_align_t)
|| !Obj::nothrowMove

The documentation for this class was generated from the following file: