xentara-utils v2.0.4
The Xentara Utility Library
Loading...
Searching...
No Matches
xentara::utils::functional::function_ref< S > Class Template Reference

Implementation of std::function_ref More...

Detailed Description

template<class... S>
class xentara::utils::functional::function_ref< S >

Implementation of std::function_ref

This is an implementation of the proposed std::function_ref from P0792R13 from C++23, taken from https://github.com/zhihaoy/nontype_functional.

std::function_ref is a proposed wrapper that allows passing any callable to a function without any overhead. This distinguishes it from std::function and std::move_only_function, which may need to move the callable and/or allocate memory.

This base template is not defined, and cannot be used. Instead, you must use one of the following four specializations: