forked from microsoft/STL
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update #2
Merged
Merged
Update #2
Conversation
This file contains 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
* Simplify thread0.cpp and xthrow.cpp. I verified with `#error` that these files are always compiled with `_HAS_EXCEPTIONS=1`. thread0.cpp Include only necessary headers. Move the lookup tables within `_STD_BEGIN` to avoid repeated `_STD` qualification. They're `static`, so this doesn't affect bincompat. Add trailing commas for readability. Make `codes` a table of `errc` so we don't need to cast each value. Mark `_Throw_Cpp_error` as `[[noreturn]]`, matching its declaration in the header. (No bincompat effect.) Use `_THROW` for consistency. (Even though exceptions are enabled, we conventionally use this in `src`.) `system_error` is a type, so we don't need to `_STD` qualify it. `static_cast<int>` the `errc`, once. xthrow.cpp Coalesce headers. Coalesce `std` regions. Remove unnecessary comments. Mark value parameters as const. * Add constexpr.
…#244) Xiang Fan of the C1XX frontend team reported that this improved throughput in a customer submitted benchmark.
Implements iterator primitive operations `std::ranges::advance`, `std::ranges::next`, `std::ranges::prev`, and `std::ranges::distance`; as well as `std::default_sentinel` and `std::unreachable_sentinel`. This change reworks the STL's iterator unwrapping machinery to enable unwrapping of C++20 move-only single-pass iterators (and `if constepxr`s all the things). Consequently, `_Iter_ref_t`, `_Iter_value_t`, and `_Iter_diff_t` resolve to `iter_reference_t`, `iter_value_t`, and `iter_difference_t` (respectively) in `__cpp_lib_concepts` (soon to be C++20) mode. This change necessitates some fixes to `unique_copy` and `_Fill_memset_is_safe` which both assume that `_Iter_value_t<T>` is well-formed for any iterator `T`. (`iter_value_t<T>` does not have that property: it is only well-formed when `readable<T>`.) I notably haven't unified `default_sentinel_t` with `_Default_sentinel` out of an abundance of paranoia. Our `move_iterator` is comparable with `_Default_sentinel`, which is not the case for `std::default_sentinel`. Drive-by: * This change `if constexpr`-izes `unique_copy`.
…ers (#341) * Implement P1690R1 Refining Heterogeneous Lookup For Unordered Containers * Mark P1690R1 as implemented in yvals_core.h.
Addresses #268 by changing the implementation to match the current Standardese.
Programs that include such specializations are ill-formed, since the Standard only specifies a partial specialization of `std::function<T>` for non-`noexcept` function types `T`. The current diagnostic: ``` error C2027: use of undefined type 'std::_Get_function_impl<_Fty>' ``` is not great. Fixes DevCom-825902. [This is a replay of Microsoft-internal MSVC-PR-215822.]
Hidden friends aren't hidden in C1XX's permissive mode, so let's use an alternate mechanism to make these operators truly ADL-only. (We want to avoid checking `weakly_incrementable` for every type that is compared via `==` or `!=` with a type associated with namespace `std`.)
AdamBucior
added a commit
that referenced
this pull request
Sep 4, 2020
Co-authored-by: Billy O'Neal <bion@microsoft.com> Co-authored-by: Adam Bucior <35536269+AdamBucior@users.noreply.github.com> Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
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.
No description provided.