.. index:: pair: class; EE::SmallFunction .. _doxid-class_e_e_1_1_small_function: template class EE::SmallFunction ================================ .. toctree:: :hidden: struct_EE_SmallFunction_VTable.rst Copyable type-erased void callable with inline storage and a heap fallback. This intentionally implements only the signature used by the scene scheduler. Ordinary lambdas stay inside the object; unusually large or over-aligned callables retain std::function-like fallback behavior. .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include template class SmallFunction { public: // structs struct :ref:`VTable`; // construction :target:`SmallFunction`(); :target:`SmallFunction`(std::nullptr_t); :target:`SmallFunction`(const SmallFunction& other); :target:`SmallFunction`(SmallFunction&& other); template , std::enable_if_t&&std::is_invocable_r_v, int> = 0> :target:`SmallFunction`(Callable&& callable); :target:`~SmallFunction`(); // methods SmallFunction& :target:`operator=`(const SmallFunction& other); SmallFunction& :target:`operator=`(SmallFunction&& other); template , std::enable_if_t&&std::is_invocable_r_v, int> = 0> SmallFunction& :target:`operator=`(Callable&& callable); SmallFunction& :target:`operator=`(std::nullptr_t); :target:`operator bool`() const; void :target:`operator()`() const; void :target:`reset`(); static constexpr std::size_t :target:`inlineSize`(); };