STL
STL copied to clipboard
P3168R2 `std::optional` Range Support
WG21-P3168R2 std::optional Range Support
Feature-test macro:
#define __cpp_lib_optional_range_support 202406L
Note: We're focused on implementing the remaining library-only features in C++23. Until that's done, we will NOT be accepting PRs for C++26 features.
I know C++26 features aren't being accepted at the moment but this should probably be blocked on the outcome of https://wg21.link/P3415
I know C++26 features aren't being accepted at the moment but this should probably be blocked on the outcome of https://wg21.link/P3415
Half of the reason to ship experimental features is to find problems. If anything I think controversy and/or questions about a feature suggests we should implement it earlier to get feedback.
I know C++26 features aren't being accepted at the moment but this should probably be blocked on the outcome of https://wg21.link/P3415
P3415 is dead per the GitHub issue.
The changes will be trivial if we just let the (const_)iterator types be pointers. Do we want to invent specific iterator types?
We conventionally never define iterators to be pointers even though it would be easier, since it allows bogus code to compile.