-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
P1206R7 Conversions From Ranges To Containers #2806
Merged
Merged
Commits on Jun 20, 2022
-
P1206R7 Conversions From Ranges To Containers
`<ranges>`: Implement `ranges::to`, guarded by `__cpp_lib_ranges_to_container`. The following are all guarded by `__cpp_lib_containers_ranges`: `<xmemory>`: Generalize `_Uninitialized_copy` to iterator+sentinel ranges; add `_Uninitialized_copy_n` for counted ranges. Implement `from_range_t`, `from_range`, and exposition-only helper concepts / type aliases. `<xutility>`: Promote `_Get_final_iterator_unwrapped` here from `<algorithm>`. Add `_Copy_memmove_n` (`_Copy_n_unchecked`), similar to `_Copy_memmove` (resp. `_Copy_unchecked`) but for counted ranges. Generalize `_Iter_copy_cat` to `_Sent_copy_cat`. `<memory>`: Use `_Copy_memmove_n` (see `<xutility>`) as appropriate. `<yvals_core.h>`: `_HAS_CXX23` controls P1206R7, define `__cpp_lib_containers_ranges` and `__cpp_lib_ranges_to_container`. `<deque>`: Implement `from_range_t` constructor(s) and corresponding deduction guide(s), `prepend_range`, `append_range`, `assign_range`, and `insert_range`. `<forward_list>`: Implement `from_range_t` constructor(s) and corresponding deduction guide(s), `prepend_range`, `assign_range`, and `insert_range_after`. `<list>`: Implement `from_range_t` constructor(s) and corresponding deduction guide(s), `prepend_range`, `append_range`, `assign_range`, and `insert_range`. `<map>` and `<set>`: For both `map`, `multimap`, `set`, and `multiset`, implement `from_range_t` constructor(s) and corresponding deduction guide(s). (Inherit `insert_range` from `_Tree`.) `<queue>`: For both `queue` and `priority_queue`, implement `from_range_t` constructor(s) and corresponding deduction guide(s), and `push_range`. (I've speculatively implemented `priority_queue::push_range` by calling `append_range` on the container per the resolution I've proposed for an LWG issue I submitted specifically to allow implementation via `append_range`.) `<stack>`: Implement `from_range_t` constructor(s) and corresponding deduction guide(s), and `push_range`. `<unordered_map>` and `<unordered_set>`: For both `unordered_map`, `unordered_multimap`, `unordered_set`, and `unordered_multiset`, implement `from_range_t` constructor(s) and corresponding deduction guide(s). (Inherit `insert_range` from `_Hash`.) `<vector>`: For both `vector` and `vector<bool>`, implement `from_range_t` constructor(s) and corresponding deduction guide(s), `append_range`, `assign_range`, and `insert_range`. `<xstring>`: For both `basic_string`, implement `from_range_t` constructor(s) and corresponding deduction guide(s), `append_range`, `assign_range`, `insert_range`, and `replace_with_range`. Test both new feature-test macros in `tests/std/tests/VSO_0157762_feature_test_macros`. Test all new deduction guides in `tests/std/tests/P0433R2_deduction_guides`. Test `_Copy_n_unchecked` in `tests/std/tests/P0784R7_library_machinery`. Add new t`P1206R7_{container}_{operation}` "range algorithm"-style tests for each new container (or container adapter) member function. Add new `P1206R7_from_range` test for `from_range` and `from_range_t`. Add new `P1206R7_ranges_to` test for `ranges::to`. Fixes microsoft#2532.
Configuration menu - View commit details
-
Copy full SHA for a47b6d0 - Browse repository at this point
Copy the full SHA a47b6d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for a62fe8b - Browse repository at this point
Copy the full SHA a62fe8bView commit details
Commits on Jun 21, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 4e59216 - Browse repository at this point
Copy the full SHA 4e59216View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2cb4fe9 - Browse repository at this point
Copy the full SHA 2cb4fe9View commit details
Commits on Jun 22, 2022
-
Configuration menu - View commit details
-
Copy full SHA for b5d02f4 - Browse repository at this point
Copy the full SHA b5d02f4View commit details -
factor commonality from forward_list::insert_range_after and ::insert…
…_after(pos, first, last)
Configuration menu - View commit details
-
Copy full SHA for 5fae89b - Browse repository at this point
Copy the full SHA 5fae89bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 593e9a1 - Browse repository at this point
Copy the full SHA 593e9a1View commit details
Commits on Jun 24, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 3b687e8 - Browse repository at this point
Copy the full SHA 3b687e8View commit details -
Configuration menu - View commit details
-
Copy full SHA for ccf85f4 - Browse repository at this point
Copy the full SHA ccf85f4View commit details -
Configuration menu - View commit details
-
Copy full SHA for b2a0262 - Browse repository at this point
Copy the full SHA b2a0262View commit details -
Configuration menu - View commit details
-
Copy full SHA for e75816a - Browse repository at this point
Copy the full SHA e75816aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3e6b68f - Browse repository at this point
Copy the full SHA 3e6b68fView commit details
Commits on Jun 27, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 29feac1 - Browse repository at this point
Copy the full SHA 29feac1View commit details
Commits on Jul 25, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 073cc1a - Browse repository at this point
Copy the full SHA 073cc1aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 06614a3 - Browse repository at this point
Copy the full SHA 06614a3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 56eadd0 - Browse repository at this point
Copy the full SHA 56eadd0View commit details
Commits on Jul 28, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 1612f7b - Browse repository at this point
Copy the full SHA 1612f7bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 412e87d - Browse repository at this point
Copy the full SHA 412e87dView commit details -
Configuration menu - View commit details
-
Copy full SHA for baa2afa - Browse repository at this point
Copy the full SHA baa2afaView commit details
Commits on Aug 8, 2022
-
Configuration menu - View commit details
-
Copy full SHA for e213a64 - Browse repository at this point
Copy the full SHA e213a64View commit details -
Configuration menu - View commit details
-
Copy full SHA for 148de4b - Browse repository at this point
Copy the full SHA 148de4bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 748e8fd - Browse repository at this point
Copy the full SHA 748e8fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6eafabd - Browse repository at this point
Copy the full SHA 6eafabdView commit details -
Configuration menu - View commit details
-
Copy full SHA for cb3b81d - Browse repository at this point
Copy the full SHA cb3b81dView commit details -
Configuration menu - View commit details
-
Copy full SHA for d05cbd8 - Browse repository at this point
Copy the full SHA d05cbd8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8ffc780 - Browse repository at this point
Copy the full SHA 8ffc780View commit details -
Configuration menu - View commit details
-
Copy full SHA for bb956af - Browse repository at this point
Copy the full SHA bb956afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7641514 - Browse repository at this point
Copy the full SHA 7641514View commit details -
Configuration menu - View commit details
-
Copy full SHA for d424e80 - Browse repository at this point
Copy the full SHA d424e80View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7883bd4 - Browse repository at this point
Copy the full SHA 7883bd4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 371deba - Browse repository at this point
Copy the full SHA 371debaView commit details -
Configuration menu - View commit details
-
Copy full SHA for b983211 - Browse repository at this point
Copy the full SHA b983211View commit details -
Configuration menu - View commit details
-
Copy full SHA for e9c4a4e - Browse repository at this point
Copy the full SHA e9c4a4eView commit details -
Configuration menu - View commit details
-
Copy full SHA for b9d8186 - Browse repository at this point
Copy the full SHA b9d8186View commit details -
Configuration menu - View commit details
-
Copy full SHA for a4932c5 - Browse repository at this point
Copy the full SHA a4932c5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5582f29 - Browse repository at this point
Copy the full SHA 5582f29View commit details -
Chack construction from
const from_range_t&
instead offrom_range_t
... per resolution of just-submitted LWG issue.
Configuration menu - View commit details
-
Copy full SHA for 4c9dc79 - Browse repository at this point
Copy the full SHA 4c9dc79View commit details
Commits on Aug 9, 2022
-
Configuration menu - View commit details
-
Copy full SHA for d2cc9ed - Browse repository at this point
Copy the full SHA d2cc9edView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.