-
-
Notifications
You must be signed in to change notification settings - Fork 8
Replace std::invoke
usages with a new __ztd_detail::__invoke
#2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Does this also mean we throw |
Not necessarily. We can conditionally include
I guess we cannot "replace" |
This is on my radar, but I haven't had the energy to tackle it. Sorry; I don't mean to let you think I had forgotten! Also, as far as invoke goes, there's an EXTRA speedy implementation here: |
No worries, I understand that not every problem can be tackled within a second. I looked at the implementation you linked and it looks pretty solid. However, there's something that concerns me: I missed it at first, but |
<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 examplereference_wrapper.hpp
). Thus I propose to add a new header onztd/idk/detail
namedinvoke.hpp
which provides an implementation ofstd::invoke
/std::invoke_result
/std::is_invocable
named__ztd_detail::
{__invoke
,__invoke_result
,__is_invocable
} and replace the use of the equivalentstd::
classes over the library. A reference implementation ofstd::invoke
can be found here.The text was updated successfully, but these errors were encountered: