Use tl::function_ref instead of std::function whenever you don't need to own the callable. The most common case for this is function parameters which aren't stored anywhere: ...