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
Fix is_iterator for container algorithms #1785
Conversation
- This commit fixes is_iterator which failed to use SFINAE properly and - calls invoke on proj so that member functions can be called
@@ -92,7 +93,8 @@ namespace hpx { namespace parallel { HPX_INLINE_NAMESPACE(v1) | |||
[f, proj](reference t) | |||
{ | |||
using hpx::util::get; | |||
get<1>(t) = f(proj(get<0>(t))); //-V573 | |||
using hpx::util::invoke; | |||
get<1>(t) = f(invoke(proj, get<0>(t))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should probably be hpx::util::invoke
lgtm, thanks! |
@hkaiser: just out of curiosity, what's benefit of using explicit quailification of hpx::util::invoke instead of using declarations in this case? |
Using
|
@AntonBikineev It avoids ADL havoc, qualified vs unqualified is always about avoiding ADL. For instance, when |
@K-ballo: thanks for the point. What about this: |
Fix is_iterator for container algorithms
can be passed as arguments.