-
-
Notifications
You must be signed in to change notification settings - Fork 442
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
Add C++23 fold algorithms #6224
Comments
Note 1: Only ranges overloads were proposed. |
so should we enable fold algorithms only if HPX compiled with C++23 std? |
No, we should have those algorithms such that people can use them with C++17, if needed. |
We would have to deviate from the standard. |
Yes, that would have to be added as well. I thin pre-c++23 these should be in |
sure, do we have a hpx::optional? if so do you suggest returning it instead of std::optional? If not, do we plan on implementing it? |
Yes, please use |
Update the CMakeLists.txt file of your project to set the appropriate C++ standard and compiler flags. Add the following lines to enable C++23 features: |
C++23 added the following
fold
algorithms:ranges::fold_left
(https://en.cppreference.com/w/cpp/algorithm/ranges/fold_left)ranges::fold_left_first
(https://en.cppreference.com/w/cpp/algorithm/ranges/fold_left_first)ranges::fold_right
(https://en.cppreference.com/w/cpp/algorithm/ranges/fold_right)ranges::fold_right_first
(https://en.cppreference.com/w/cpp/algorithm/ranges/fold_right_first)ranges::fold_left_with_iter
(https://en.cppreference.com/w/cpp/algorithm/ranges/fold_left_with_iter)ranges::fold_left_first_with_iter
(https://en.cppreference.com/w/cpp/algorithm/ranges/fold_left_first_with_iter)These algorithms are specified as enforcing sequential execution. We should discuss whether those should be added to HPX anyways.
See also: http://eel.is/c++draft/alg.fold
The text was updated successfully, but these errors were encountered: