-
-
Notifications
You must be signed in to change notification settings - Fork 450
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
Adapt replace(_if) to C++20 #5192
Conversation
79fb065
to
df45984
Compare
libs/parallelism/algorithms/include/hpx/parallel/algorithms/replace.hpp
Outdated
Show resolved
Hide resolved
libs/parallelism/algorithms/include/hpx/parallel/algorithms/replace.hpp
Outdated
Show resolved
Hide resolved
libs/parallelism/algorithms/include/hpx/parallel/algorithms/replace.hpp
Outdated
Show resolved
Hide resolved
libs/parallelism/algorithms/include/hpx/parallel/algorithms/replace.hpp
Outdated
Show resolved
Hide resolved
libs/parallelism/algorithms/include/hpx/parallel/algorithms/replace.hpp
Outdated
Show resolved
Hide resolved
libs/parallelism/algorithms/include/hpx/parallel/algorithms/replace.hpp
Outdated
Show resolved
Hide resolved
libs/parallelism/algorithms/include/hpx/parallel/algorithms/replace.hpp
Outdated
Show resolved
Hide resolved
libs/parallelism/algorithms/include/hpx/parallel/algorithms/replace.hpp
Outdated
Show resolved
Hide resolved
libs/parallelism/algorithms/include/hpx/parallel/algorithms/replace.hpp
Outdated
Show resolved
Hide resolved
libs/parallelism/algorithms/include/hpx/parallel/algorithms/replace.hpp
Outdated
Show resolved
Hide resolved
libs/parallelism/algorithms/include/hpx/parallel/algorithms/replace.hpp
Outdated
Show resolved
Hide resolved
251864d
to
6f12434
Compare
24035b6
to
dc92a8a
Compare
libs/parallelism/algorithms/include/hpx/parallel/container_algorithms/replace.hpp
Outdated
Show resolved
Hide resolved
dc92a8a
to
60dd21c
Compare
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.
LGTM, thanks!
@hkaiser Should I also provide docs for the result types (e.g. |
That would be nice. You can add the docs as doxygen comments close to the actual types. Feel free to steal the text from rangev3, if available there. |
This should be ok now, once CI gets greeny. |
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.
Hey sorry for the late review, some minor comments about the docs otherwise LGTM thanks a lot!
/// (deduced). | ||
/// \tparam T The type of the new values to replace (deduced). | ||
/// | ||
/// \param policy The execution policy to use for the scheduling of |
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.
Same here
/// output iterator. | ||
/// \tparam T The type of the old and new values (deduced). | ||
/// | ||
/// \param policy The execution policy to use for the scheduling of |
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.
Same here
FwdIter2 dest, T1 const& old_value, T2 const& new_value, | ||
Proj&& proj = Proj()) | ||
// clang-format off | ||
template <typename ExPolicy, typename FwdIter1, typename Sent, |
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.
I know this PR has been merged but did you add typename Sent by mistake? Since last is of type FwdIter1 for this deprecated overload.
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.
@Jedi18 Great catch! Don't tell the boss, I will take care of it asap ;)
This adapts
replace
/replace_if
/replace_copy
/replace_copy_if
to C++20.Please don't merge yet, docs will be added soon.