idk
idk copied to clipboard
Replace `std::invoke` usages with a new `__ztd_detail::__invoke`
<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.