QuickCppLib 0.10
Eliminate all the tedious hassle when making state-of-the-art C++ 14 - 23 libraries!
|
The namespace for the function pointer type. More...
Classes | |
class | function_ptr |
A move only lightweight std::function alternative, with configurable small object optimisation. More... | |
class | function_ptr< R(Args...), callable_storage_bytes > |
Functions | |
template<class ErasedPrototype , class Callable , size_t callable_storage_bytes = default_callable_storage_bytes, class... CallableConstructionArgs> | |
constexpr function_ptr< ErasedPrototype, callable_storage_bytes > | emplace_function_ptr (CallableConstructionArgs &&... args) |
Return a function_ptr<ErasedPrototype> by emplacing Callable(CallableConstructionArgs...) . If Callable is nothrow move constructible and sufficiently small, avoids dynamic memory allocation. | |
template<class ErasedPrototype , class Callable , class... CallableConstructionArgs> | |
constexpr function_ptr< ErasedPrototype,(sizeof(Callable)+sizeof(void *)+sizeof(void *) - 1) &~(sizeof(void *) - 1)> | emplace_function_ptr_nothrow (CallableConstructionArgs &&... args) noexcept |
Return a function_ptr<ErasedPrototype> by emplacing Callable(CallableConstructionArgs...) , without dynamically allocating memory. Note that the size of function ptr returned will be exactly the amount to store the callable, which may not be the default size of function_ptr<ErasedPrototype> . | |
template<class ErasedPrototype , class Callable , size_t callable_storage_bytes = default_callable_storage_bytes> | |
constexpr function_ptr< ErasedPrototype, callable_storage_bytes > | make_function_ptr (Callable &&f) |
Return a function_ptr<ErasedPrototype> by from an input Callable . If Callable is nothrow move constructible and sufficiently small, avoids dynamic memory allocation. | |
template<class ErasedPrototype , class Callable > | |
constexpr auto | make_function_ptr_nothrow (Callable &&f) noexcept |
Return a function_ptr<ErasedPrototype> by from an input Callable , without dynamically allocating memory. Note that the size of function ptr returned will be exactly the amount to store the callable, which may not be the default size of function_ptr<ErasedPrototype> . | |
The namespace for the function pointer type.
|
inlineconstexpr |
Return a function_ptr<ErasedPrototype>
by emplacing Callable(CallableConstructionArgs...)
. If Callable
is nothrow move constructible and sufficiently small, avoids dynamic memory allocation.
|
inlineconstexprnoexcept |
Return a function_ptr<ErasedPrototype>
by emplacing Callable(CallableConstructionArgs...)
, without dynamically allocating memory. Note that the size of function ptr returned will be exactly the amount to store the callable, which may not be the default size of function_ptr<ErasedPrototype>
.
|
inlineconstexpr |
Return a function_ptr<ErasedPrototype>
by from an input Callable
. If Callable
is nothrow move constructible and sufficiently small, avoids dynamic memory allocation.
|
inlineconstexprnoexcept |
Return a function_ptr<ErasedPrototype>
by from an input Callable
, without dynamically allocating memory. Note that the size of function ptr returned will be exactly the amount to store the callable, which may not be the default size of function_ptr<ErasedPrototype>
.