Inherits from ::fit::internal::function_base<inline_target_size, require_inline, Result (Args...), Allocator>
function_impl<inline_target_size, require_inline, type-parameter-0-3 (type-parameter-0-4...), type-parameter-0-2>
public void function_impl<inline_target_size, require_inline, type-parameter-0-3 (type-parameter-0-4...), type-parameter-0-2>()
Defined at line 217 of file ../../sdk/lib/fit/include/lib/fit/function.h
Initializes an empty (null) function. Attempting to call an empty function will abort the program.
function_impl<inline_target_size, require_inline, type-parameter-0-3 (type-parameter-0-4...), type-parameter-0-2>
public void function_impl<inline_target_size, require_inline, type-parameter-0-3 (type-parameter-0-4...), type-parameter-0-2>(decltype(nullptr) )
Defined at line 221 of file ../../sdk/lib/fit/include/lib/fit/function.h
Creates a function with an empty target (same outcome as the default constructor).
function_impl<inline_target_size, require_inline, type-parameter-0-3 (type-parameter-0-4...), type-parameter-0-2>
public void function_impl<inline_target_size, require_inline, type-parameter-0-3 (type-parameter-0-4...), type-parameter-0-2>(Result (*)(Args...) function_target)
Defined at line 225 of file ../../sdk/lib/fit/include/lib/fit/function.h
Creates a function bound to the specified function pointer. If target == nullptr, assigns an empty target.
function_impl<inline_target_size, require_inline, type-parameter-0-3 (type-parameter-0-4...), type-parameter-0-2>
public void function_impl<inline_target_size, require_inline, type-parameter-0-3 (type-parameter-0-4...), type-parameter-0-2>(Callable && function_target)
Defined at line 241 of file ../../sdk/lib/fit/include/lib/fit/function.h
Creates a function bound to the specified callable object. If target == nullptr, assigns an empty target.
For functors, we need to capture the raw type but also restrict on the existence of an appropriate operator () to resolve overloads and implicit casts properly.
Note that specializations of this template method that take fit::callback objects as the target Callable are deleted (see below).
function_impl<inline_target_size, require_inline, type-parameter-0-3 (type-parameter-0-4...), type-parameter-0-2>
public void function_impl<inline_target_size, require_inline, type-parameter-0-3 (type-parameter-0-4...), type-parameter-0-2>(::fit::callback_impl<other_inline_target_size, other_require_inline, Result (Args...), OtherAllocator> )
Defined at line 249 of file ../../sdk/lib/fit/include/lib/fit/function.h
Deletes the specializations of function_impl(Callable) that would allow a |fit::function| to be constructed from a |fit::callback|. This prevents unexpected behavior of a |fit::function| that would otherwise fail after one call. To explicitly allow this, simply wrap the |fit::callback| in a pass-through lambda before passing it to the |fit::function|.
function_impl<inline_target_size, require_inline, type-parameter-0-3 (type-parameter-0-4...), type-parameter-0-2>
public void function_impl<inline_target_size, require_inline, type-parameter-0-3 (type-parameter-0-4...), type-parameter-0-2>(function_impl<inline_target_size, require_inline, type-parameter-0-3 (type-parameter-0-4...), type-parameter-0-2> && other)
Defined at line 254 of file ../../sdk/lib/fit/include/lib/fit/function.h
Creates a function with a target moved from another function, leaving the other function with an empty target.
~function_impl<inline_target_size, require_inline, type-parameter-0-3 (type-parameter-0-4...), type-parameter-0-2>
public void ~function_impl<inline_target_size, require_inline, type-parameter-0-3 (type-parameter-0-4...), type-parameter-0-2>()
Defined at line 257 of file ../../sdk/lib/fit/include/lib/fit/function.h
Destroys the function, releasing its target.
operator=
public function_impl<inline_target_size, require_inline, type-parameter-0-3 (type-parameter-0-4...), type-parameter-0-2> & operator=(decltype(nullptr) )
Defined at line 261 of file ../../sdk/lib/fit/include/lib/fit/function.h
Assigns the function to an empty target. Attempting to invoke the function will abort the program.
operator=
public assignment_requires_conditions<std::is_convertible<decltype(std::declval<Callable &>()(std::declval<Args>()...)), result_type>, not_self_type<Callable>> operator=(Callable && function_target)
Defined at line 277 of file ../../sdk/lib/fit/include/lib/fit/function.h
NOLINTNEXTLINE(misc-unconventional-assign-operator)
operator=
public function_impl<inline_target_size, require_inline, type-parameter-0-3 (type-parameter-0-4...), type-parameter-0-2> & operator=(::fit::callback_impl<other_inline_target_size, other_require_inline, Result (Args...), OtherAllocator> )
Defined at line 293 of file ../../sdk/lib/fit/include/lib/fit/function.h
Deletes the specializations of operator=(Callable) that would allow a |fit::function| to be assigned from a |fit::callback|. This prevents unexpected behavior of a |fit::function| that would otherwise fail after one call. To explicitly allow this, simply wrap the |fit::callback| in a pass-through lambda before assigning it to the |fit::function|.
operator=
public function_impl<inline_target_size, require_inline, type-parameter-0-3 (type-parameter-0-4...), type-parameter-0-2> & operator=(function_impl<inline_target_size, require_inline, type-parameter-0-3 (type-parameter-0-4...), type-parameter-0-2> && other)
Defined at line 297 of file ../../sdk/lib/fit/include/lib/fit/function.h
swap
public void swap(function_impl<inline_target_size, require_inline, type-parameter-0-3 (type-parameter-0-4...), type-parameter-0-2> & other)
Defined at line 305 of file ../../sdk/lib/fit/include/lib/fit/function.h
Swaps the functions' targets.
operator()
public Result operator()(Args... args)
Defined at line 315 of file ../../sdk/lib/fit/include/lib/fit/function.h
Invokes the function's target. Aborts if the function's target is empty.
share
public
function_impl
share()
Defined at line 324 of file ../../sdk/lib/fit/include/lib/fit/function.h
Returns a new function object that invokes the same target. The target itself is not copied; it is moved to the heap and its lifetime is extended until all references have been released.
Note: This method is not supported on |fit::inline_function<>| because it may incur a heap allocation which is contrary to the stated purpose of |fit::inline_function<>|.