Contents

class

SushiEngine::Core::InlineFunction< Result(Arguments...), Capacity >

template <typename Result, typename... Arguments, std::size_t Capacity>

Owns one callable invocable as Result(Arguments...) inside fixed inline storage.

Declared in
engine/foundation/core/include/SushiEngine/core/inline_function.hpp

Precondition

The callable's decayed size and alignment fit Capacity and alignof(std::max_align_t).

Public Methods

InlineFunction

Move-constructs callable into inline storage; never allocates.

operator=

Destroys any held callable, then relocates other's callable into this one.

~InlineFunction

Destroys the held callable, if any.

operator()

Calls the held callable with arguments and returns its result.

is_empty

Returns whether this instance holds no callable, true only after it was moved from.