Ranges <range> machinery#82
Merged
CaseyCarter merged 1 commit intomicrosoft:masterfrom Sep 9, 2019
CaseyCarter:dual_200667
Merged
Ranges <range> machinery#82CaseyCarter merged 1 commit intomicrosoft:masterfrom CaseyCarter:dual_200667
CaseyCarter merged 1 commit intomicrosoft:masterfrom
CaseyCarter:dual_200667
Conversation
Member
|
Your description says "Annotate P0896R4 as partially implemented in the "_HAS_CXX20 indirect" section of <yvals_core.h>." but you're actually coalescing that section away. Also, consider hyperlinking P1474R1 in the description. Otherwise, looks good to me. |
* Implements a selection of support machinery in `std::ranges` and adds the `<ranges>` header. Primarily consists of the range access customization point objects: * `ranges::begin` * `ranges::end` * `ranges::cbegin` * `ranges::cend` * `ranges::rbegin` * `ranges::rend` * `ranges::crbegin` * `ranges::crend` * `ranges::size` * `ranges::empty` * `ranges::data` * `ranges::cdata` and range concepts: * `ranges::range` * `ranges::output_range` * `ranges::input_range` * `ranges::forward_range` * `ranges::bidirectional_range` * `ranges::random_access_range` * `ranges::contiguous_range` * `ranges::sized_range` * `ranges::view` * `ranges::common_range` and the associated type aliases: * `ranges::iterator_t` * `ranges::sentinel_t` * `ranges::range_value_t` * `ranges::range_reference_t` * `ranges::range_difference_t` * `ranges::range_rvalue_reference_t` * Adds `<ranges>` - which is mostly empty since the support machinery is defined in `<xutility>` so as to be visible to `<algorithm>` * Annotates [P0896R4](https://wg21.link/p0896r4) as partially implemented in the "`_HAS_CXX20` directly controls" section of `<yvals_core.h>`. * Touches `<regex>`, `<set>`, and `<unordered_set>` to add partial specializations of `ranges::enable_view` for `match_results` and `(unordered_)?multi?set` as mandated by the WD to override the heuristic. * Partially implements [P1474R1 "Helpful pointers for `ContiguousIterator`"](https://wg21.link/p1474r1): * Push `pointer_traits` from `<xmemory>` and `to_address` from `<memory>` up into `<xutility>` * Add `to_address` expression requirement to `contiguous_iterator` concept, and update `P0896R4_ranges_iterator_machinery` appropriately * Implement the changes to `ranges::data` (but not `view_interface` since it isn't yet implemented) * Drive-by: * Simplify the definition of `pointer_traits::_Reftype` by eschewing `add_lvalue_reference_t`. * Strengthen `reverse_iterator`'s constructors and `make_reverse_iterator` so `ranges::rbegin` and `ranges::rend` can be `noexcept` in more cases * Since we're using `_Rng` as the template parameter name for models of `std::ranges::range`, rename a local variable `_Rng` to `_Generator` in `<random>`
Contributor
Author
Corrected.
I've hyperlinked both P1474R1 and P0896R4. (And updated both the actual commit log and the description above.) |
BillyONeal
pushed a commit
that referenced
this pull request
Sep 11, 2019
C4180 "qualifier applied to function type has no meaning; ignored" is emitted from `std::remove_reference<T>` when `T` is a function type or reference to such after applying the changes in #82. We could suppress it locally, but the warning is extremely low-value for the STL in general so let's simply suppress it globally.
CaseyCarter
added a commit
that referenced
this pull request
Sep 12, 2019
I experimented with different methods of preparing the dual checkin PR, and chose the wrong one.
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a port of Microsoft-internal PR 200667. [This info is a convenience for internal reviewers, it is NOT part of the commit log.]
Ranges machinery
Implements a selection of support machinery in
std::rangesand adds the<ranges>header. Primarily consists of the range access customization point objects:ranges::beginranges::endranges::cbeginranges::cendranges::rbeginranges::rendranges::crbeginranges::crendranges::sizeranges::emptyranges::dataranges::cdataand range concepts:
ranges::rangeranges::output_rangeranges::input_rangeranges::forward_rangeranges::bidirectional_rangeranges::random_access_rangeranges::contiguous_rangeranges::sized_rangeranges::viewranges::common_rangeand the associated type aliases:
ranges::iterator_tranges::sentinel_tranges::range_value_tranges::range_reference_tranges::range_difference_tranges::range_rvalue_reference_tAdds
<ranges>- which is mostly empty since the support machinery is defined in<xutility>so as to be visible to<algorithm>Annotates P0896R4 as partially implemented in the "
_HAS_CXX20directly controls" section of<yvals_core.h>.Touches
<regex>,<set>, and<unordered_set>to add partial specializations ofranges::enable_viewformatch_resultsand(unordered_)?multi?setas mandated by the WD to override the heuristic.Partially implements P1474R1 "Helpful pointers for
ContiguousIterator":pointer_traitsfrom<xmemory>andto_addressfrom<memory>up into<xutility>to_addressexpression requirement tocontiguous_iteratorconcept, and updateP0896R4_ranges_iterator_machineryappropriatelyranges::data(but notview_interfacesince it isn't yet implemented)Drive-by:
pointer_traits::_Reftypeby eschewingadd_lvalue_reference_t.reverse_iterator's constructors andmake_reverse_iteratorsoranges::rbeginandranges::rendcan benoexceptin more cases_Rngas the template parameter name for models ofstd::ranges::range, rename a local variable_Rngto_Generatorin<random>