idk icon indicating copy to clipboard operation
idk copied to clipboard

Replace `std::invoke` usages with a new `__ztd_detail::__invoke`

Open TerensTare opened this issue 2 years ago • 4 comments

<functional> is a huge header, containing (but not limited to) hash, reference_wrapper, function, invoke and much more. Most of the time all these classes are not needed at the same place at the same time, so a #include <functional> may be something expensive, especially on headers (for example reference_wrapper.hpp). Thus I propose to add a new header on ztd/idk/detail named invoke.hpp which provides an implementation of std::invoke/std::invoke_result/std::is_invocable named __ztd_detail::{__invoke, __invoke_result, __is_invocable} and replace the use of the equivalent std:: classes over the library. A reference implementation of std::invoke can be found here.

TerensTare avatar Jul 05 '21 17:07 TerensTare