Skip to content

Conversation

@CaseyCarter
Copy link
Contributor

To pick up #1337.

Note that the final commit is a merge conflict resolution requiring actual review.

⚠️ Commit this as a merge, not a squash! ⚠️

CaseyCarter and others added 30 commits September 22, 2020 15:02
* Minimal changes to support constexpr allocation in MSVC

* Define `_CONSTEXPR20_DYNALLOC` macro to `constexpr` when the compiler defines `__cpp_constexpr_dynamic_alloc` and `inline` otherwise.
* Implement and test `ranges::construct_at` and `ranges::destroy_at`, mark them (and `std` flavors) `_CONSTEXPR20_DYNALLOC`.
* Implement `ranges::destroy` and `ranges::destroy_n` which share machinery with `ranges::destroy_at` with minimal test coverage. (More to follow.)

[This is a dual of internal MSVC-PR-275909.]
Implement several specialized memory range algorithms:
* `ranges::uninitialized_default_construct`, `ranges::uninitialized_default_construct_n`
* `ranges::uninitialized_value_construct`, `ranges::uninitialized_value_construct_n`
* `ranges::uninitialized_fill`, `ranges::uninitialized_fill_n`
* `ranges::uninitialized_copy`, `ranges::uninitialized_copy_n`
* `ranges::uninitialized_move_n`

Co-authored-by: Adam Bucior <[email protected]>
Co-authored-by: Stephan T. Lavavej <[email protected]>
Co-authored-by: Stephan T. Lavavej <[email protected]>
Co-authored-by: Casey Carter <[email protected]>
Co-authored-by: Casey Carter <[email protected]>
Co-authored-by: Stephan T. Lavavej <[email protected]>
Co-authored-by: MattStephanson <[email protected]>
Co-authored-by: Curtis J Bezault <[email protected]>
Co-authored-by: Stephan T. Lavavej <[email protected]>
CaseyCarter and others added 7 commits October 8, 2020 17:52
Makes `istream_iterator`, `ostream_iterator`, `istreambuf_iterator`, and `ostreambuf_iterator` model the C++20 iterator concepts.
Drive-by cleanup:
* explicitly compare pointers  with `nullptr` in preference to `if (ptr)` and `if (!ptr)`
* `_STL_INTERNAL_CHECK` checkable preconditions
* Use `constinit` when available to verify `constexpr` constructor

Fixes microsoft#1309.

Co-authored-by: Stephan T. Lavavej <[email protected]>
Removes workarounds for:
* VSO-938163 "`constexpr` hates pointers", revealing VSO-1132704 "Bogus C3615 when implicitly-constexpr defaulted SMF calls non-trivial SMF in base class" and VSO-1217687 "Casting object reference to base and back loses track of member values in constant expression" beneath.
* VSO-1002863 "Failure to short-circuit substitution when evaluating disjunction of atomic constraints"
* VSO-1062618 "Asymmetric behavior from conditional operator with char32_t operands"
* VSO-1125263 "EDG rejects valid code using consteval"
* VSO-1132105 "[EDG] Error using non-static data member with dependent type in noexcept-specifier of member function template"
* VSO-1132186 "[EDG] Weirdness with dependent template in noexcept-specifier"
* VSO-1178211 "[EDG] Internal compiler error on template template parameter instantiated from inherited template"

Also relabels the workarounds for VSO-1174090 "Assertion failure for member subobject with multiple prospective destructors" (which is fixed!) as workarounds for VSO-1225825 "ModuleReader doesn't understand concept overloading". 

As a bonus, remove unnecessary workarounds for DevCom-1159442 "type-constraint in deduced variable type fails when immediately following an if statement"; these type-constraints don't follow the _compound-statement_ of an `if` conditional, and so don't trigger the bug.
c70b7a8 corresponds to microsoft#1316 "Accept 80-bit `long double` in `<complex>`," which was ported into a late 16.8 preview. This will almost certainly be our last commit for 16.8.

Not that not every preceding commit is in 16.8. This is fine: we need all shipping commits to be covered by the cgmanifest, it's ok to also cover some commits that won't ship until the next release.
Hand-correct trivial conflict in `tests/std/tests.lst` due to the addition of tests at the same place in both branches.
@CaseyCarter CaseyCarter added infrastructure Related to repository automation uncharted Excluded from the Status Chart labels Oct 9, 2020
@CaseyCarter CaseyCarter requested a review from a team as a code owner October 9, 2020 02:06
Copy link
Member

@StephanTLavavej StephanTLavavej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge looks good, thanks for taking care of this.

@CaseyCarter CaseyCarter merged commit 699a195 into microsoft:feature/format Oct 9, 2020
@CaseyCarter CaseyCarter deleted the feature_format_update branch October 9, 2020 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure Related to repository automation uncharted Excluded from the Status Chart

Projects

None yet

Development

Successfully merging this pull request may close these issues.