Reduce the amount of content included by <array> (microsoft#482)#38
Merged
fengjixuchui merged 5 commits intofengjixuchui:masterfrom Feb 21, 2020
Merged
Reduce the amount of content included by <array> (microsoft#482)#38fengjixuchui merged 5 commits intofengjixuchui:masterfrom
fengjixuchui merged 5 commits intofengjixuchui:masterfrom
Conversation
* Add tests/std. * Update other files. NOTICE.txt Mention the LLVM Project, as its code appears in tests/std/tests/P0220R1_optional/test.cpp and elsewhere. azure-devops/enforce-clang-format.cmd Process everything within tests. This includes libcxx, std, and tr1. docs/cgmanifest.json Update this file for Microsoft-internal purposes. (It records the commit hashes of repos whose source code we've incorporated into our own repo. For llvm-project, this is distinct from the submodule's current commit.) tests/tr1/run.pl Mention runbe.pl in lowercase, to match the file itself. * Improve run.pl and runbe.pl comments.
Includes: * concepts `three_way_comparable` and `three_way_comparable_with`, * type trait `std::compare_three_way_result` (with `_t` alias), and * function object `compare_three_way`. in `<compare>`, and: * function objects `ranges::equal_to` and `ranges::less` (in `<xutility>` for easy algorithm access), `ranges::not_equal_to`, `ranges::less_equal`, `ranges::greater`, and `ranges::greater_equal` (in `<functional>`), * slight refactoring of concept definitions in `<concepts>` to avoid redundant requirements for the single-type comparison concepts `equality_comparable`, `totally_ordered`, and `three_way_comparable`, * heavy refactoring of the trait `common_comparison_category` (and `_t` alias) in `<compare>` to requires only `n + c` template instantiations instead of `cn` template instantiations, * ======== ABI BREAK =========== remove the `_Is_unordered` member from `std::partial_ordering` in `<compare>` since (a) it's true if and only if the stored value has a particular value, and (b) Clang expects all of the comparison category types to have size 1, * reorder all `is_transparent` alias declarations in the STL to be after the corresponding `operator()` to agree with synopsis order. Also adds a new test `P0896R4_P1614R2_comparisons` that exercises the above. The ABI BREAK sounds scary - as it should - but note that: * this is a `/std:c++latest` feature, which is subject to change, * objects of comparison category type aren't typically stored, * only MSVC has released `<compare>` so far, so it's not widely used. Altogether, it's extremely unlikely that anyone has encoded this in ABI.
* Reduce the amount of content included by <array>. Resolves GH-462. * Demote `back_inserter` and `iterator` to `<iterator>`. * Demote `_Yarn` to `<xlocinfo>`. * Demote `_Tidy_guard`, `_Tidy_deallocate_guard`, and `_Nothrow_compare` to `<xmemory>`. * Promote `_Swap_ranges_unchecked` to `<xutility>`. * Change `<array>` to include only `<xutility>`. * Un-demote iterator. * Workaround many RWC projects that expected std::min and std::max to come from <array>. * Remove the `_STL_ASSERT` from `std::min` and `std::max`. We normally guard every `op<` with debug checks, but in this case we aren't using it to enforce something like a container invariant; the number of bad op<s we catch with it are likely microscopic. * Delete `_Min_value` and `_Max_value` from `<utility>`. * Move `min` and `max` to `<utility>` (in the exact position as the old `_Min_value` and `_Max_value`) * Change all existing callers of `_Min_value` and `_Max_value` to call `(_STD min)` and `(_STD max)`, respectively. * Homogenize vector algorithm guards.
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.
Description
Checklist
Be sure you've read README.md and understand the scope of this repo.
If you're unsure about a box, leave it unchecked. A maintainer will help you.
_Uglyas perhttps://eel.is/c++draft/lex.name#3.1 or there are no product code changes.
verified by an STL maintainer before automated testing is enabled on GitHub,
leave this unchecked for initial submission).
members, adding virtual functions, changing whether a type is an aggregate
or trivially copyable, etc.).
the C++ Working Draft (including any cited standards), other WG21 papers
(excluding reference implementations outside of proposed standard wording),
and LWG issues as reference material. If they were derived from a project
that's already listed in NOTICE.txt, that's fine, but please mention it.
If they were derived from any other project (including Boost and libc++,
which are not yet listed in NOTICE.txt), you must mention it here,
so we can determine whether the license is compatible and what else needs
to be done.