Move-only function wrapper with inline storage and optional SmallBlockAllocator spill storage. Medium spill storage uses SmallBlockAllocator when GAIA_FUNC_WRAPPER_SMALLBLOCK is enabled.
More...
#include <small_func.h>
|
|
| SmallFunc ()=default |
| | Constructs an empty function wrapper.
|
| |
|
| ~SmallFunc () |
| | Destroys the stored callable, if any.
|
| |
|
| SmallFunc (const SmallFunc &)=delete |
| |
|
SmallFunc & | operator= (const SmallFunc &)=delete |
| |
| | SmallFunc (SmallFunc &&other) noexcept |
| | Move-constructs the wrapper.
|
| |
| SmallFunc & | operator= (SmallFunc &&other) noexcept |
| | Move-assigns the wrapper.
|
| |
|
template<typename F , typename = std::enable_if_t<!std::is_same_v<std::decay_t<F>, SmallFunc>>> |
| | SmallFunc (F &&f) |
| |
|
template<typename F , typename = std::enable_if_t<!std::is_same_v<std::decay_t<F>, SmallFunc>>> |
| SmallFunc & | operator= (F &&f) |
| |
|
void | exec () |
| | Executes the stored callable.
|
| |
|
void | operator() () |
| | Executes the stored callable.
|
| |
|
void | reset () |
| | Clears the wrapper.
|
| |
|
| operator bool () const |
| | Returns true when a callable is stored.
|
| |
|
| template<typename F > |
| static SmallFunc | create (F &&f) |
| | Creates a wrapper from a callable compatible with void().
|
| |
| static void | destroy (SmallFunc &func) |
| | Destroys the callable held by the wrapper.
|
| |
Move-only function wrapper with inline storage and optional SmallBlockAllocator spill storage. Medium spill storage uses SmallBlockAllocator when GAIA_FUNC_WRAPPER_SMALLBLOCK is enabled.
◆ SmallFunc()
| gaia::util::SmallFunc::SmallFunc |
( |
SmallFunc && |
other | ) |
|
|
inlinenoexcept |
Move-constructs the wrapper.
- Parameters
-
◆ create()
template<typename F >
| static SmallFunc gaia::util::SmallFunc::create |
( |
F && |
f | ) |
|
|
inlinestatic |
Creates a wrapper from a callable compatible with void().
- Template Parameters
-
- Parameters
-
- Returns
- New function wrapper.
◆ destroy()
| static void gaia::util::SmallFunc::destroy |
( |
SmallFunc & |
func | ) |
|
|
inlinestatic |
Destroys the callable held by the wrapper.
- Parameters
-
◆ operator=()
Move-assigns the wrapper.
- Parameters
-
- Returns
- Reference to this wrapper.
The documentation for this class was generated from the following file:
- /home/runner/work/gaia-ecs/gaia-ecs/include/gaia/util/small_func.h