Skip to content

Conversation

@fengjixuchui
Copy link
Owner

No description provided.

AdamBucior and others added 30 commits July 2, 2020 18:28
Fixes #51.

Co-authored-by: Stephan T. Lavavej <stl@microsoft.com>
Co-authored-by: Casey Carter <Casey@Carter.net>
* Replace "base" member of test::iterator and test::sentinel with "peek"

* The point is to break the abstraction and provide access to the internal pointer. There's no reason to mimic the behavior of iterator/sentinel adaptors, it just makes the test tool harder to use.

* Enforce that `begin` is called at most once in `test::range::_Unchecked_begin`

* Remove default arguments to the `test_meow` functions in `<range_algorithm_support.hpp>`.

* ...and swap_ranges, of course.
This reverts commit ad1a26a which was later modified by #694.

Fixes #971.

Co-authored-by: Stephan T. Lavavej <stl@microsoft.com>
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
* Fix #433: Warnings C4472 and C4571 were removed in VS 2019 16.6.
* Fix #693: Remove workarounds now that we require VS 2019 16.7.
* Use braces to construct tags (especially `_Iter_cat_t`), function objects, and empty `shared_ptr`s.
We get errors due to ambiguous symbols of `test::iterator` and `std::iterator` (thanks `using namespace std;`!)
Explicitly pull in `test::iterator` and `test::range` as well for good measure.
* Use new 64-bit interlocked intrinsics on x86

Resolves #965.

Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
* Style cleanup of `requires\s*\(`

To consistently follow the guidelines established in #982.

Fixes #982.
* Update the Azure VM Scale Set that runs the CI pipeline to VS 2019 Preview 3
* Install the `psutil` python module while provisioning VMs (Fixes #773)

Co-authored-by: Curtis Jacques Bezault <curtbezault@gmail.com>
This is a temporary workaround for #1030 to unblock ranges PRs.
Co-authored-by: Casey Carter <Casey@Carter.net>
Co-authored-by: Stephan T. Lavavej <stl@microsoft.com>
Co-authored-by: Casey Carter <Casey@Carter.net>
Co-authored-by: Casey Carter <cartec69@gmail.com>
Co-authored-by: Stephan T. Lavavej <stl@microsoft.com>
Co-authored-by: Casey Carter <Casey@Carter.net>
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
Co-authored-by: Casey Carter <cartec69@gmail.com>
Includes `ranges::is_partitioned`, `ranges::partition`, `ranges::partition_copy`, and `ranges::partition_point`.
* Change meow<>() to meow<>{}.

* Change meow<>{} to meow{} when C++17 has CTAD.
…_if (#983)

Co-authored-by: Casey Carter <Casey@Carter.net>
Co-authored-by: Stephan T. Lavavej <stl@microsoft.com>
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
* Implement ranges::copy_backward

Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
Co-authored-by: Ahana Mukhopadhyay <t-ahmukh@microsoft.com>
AlexGuteniev and others added 29 commits July 21, 2020 01:00
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Co-authored-by: Casey Carter <cartec69@gmail.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Co-authored-by: Stephan T. Lavavej <stl@microsoft.com>
Mathematically, `_Par0._Pcdf.back()` should be one. However, when it is
actually slightly smaller than one due to rounding error, there is a
small probability that `_Px > _Par0._Pcdf.back()` and the original code
returns the invalid value of `_Par0._Pcdf.size()`.
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
Co-authored-by: Casey Carter <Casey@Carter.net>
Co-authored-by: statementreply <statementreply@gmail.com>
Co-authored-by: Casey Carter <cartec69@gmail.com>
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
* Remove unnecessary comments in ranges tests.

We taught clang-format how to sort like this automatically.

* Fix x86 compiler error in stljobs.h.

This never compiled for x86 where size_t and SIZE_T are different types.

* Update .clang-format for Clang 10.

AllowShortBlocksOnASingleLine changed from false/true to
Never/Empty/Always. We still want the default of Never, as Empty
appears to misbehave.

DeriveLineEnding was added, defaulting to true. We want to disable line
ending auto-detection.

SortPriority was added. Its documentation is difficult to understand,
but it can be used to group includes together while modifying their
otherwise-lexicographic ordering. Here, I'm using it to group WinSDK
includes together, while still sorting WinIoCtl.h last.

IncludeIsMainSourceRegex was added. This doesn't appear to be relevant
to us.

IndentGotoLabels was added. We've avoided goto.

SpaceInEmptyBlock was added. We prefer the default of no space.

SpacesInConditionalStatement was added. We definitely prefer the
default of no space.

SpaceBeforeSquareBrackets was added. Again, we definitely prefer the
default of no space.

The Standard option was overhauled. Previously, Cpp11 meant "use the
latest supported standard". That was confusing, so it has been
deprecated in favor of Latest.

UseCRLF was added. We currently use CRLF for all files. (Previously,
validate.cpp would detect LF files, but clang-format wouldn't fix
them.)

* In .clang-format, delete empty lines and move comment.

The empty lines were intended to make it easier to see customized
options, but they were actually making it harder to diff the default
config against our config.

Move the StatementMacros comment next to our customized settings,
and rewrap it.

* Reformat filesystem.cpp.
Includes the `mergeable` concept and algorithms `ranges::includes`, `ranges::set_union`, `ranges::set_intersection`, `ranges::set_difference`, and `ranges::set_symmetric_difference`.
* Implement ranges::move_backward

Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
Co-authored-by: mnatsuhara <46756417+mnatsuhara@users.noreply.github.com>
`_Pass_fn` returns a copy of arguments no larger than `void*`, and a call-forwarding reference-wrapper-alike `_Ref_fn` for larger function objects. This became a problem when Ranges started throwing pointers-to-member at `_Pass_fn` with the expectation that they would eventually be `invoke`d: pointers-to-member can be larger than `void*`, but `_Ref_fn` doesn't speak the `invoke` protocol.

There are two relatively obvious possible fixes:
1. Teach `_Pass_fn` to always return copies of pointers-to-member regardless of size
2. Teach `_Ref_fn` to obey the `invoke` protocol

(1) results in "large" pointers-to-member that can't be enregistered being copied and passed by hidden reference resulting in larger codesize than (2), but with no corresponding performance benefits. We therefore implement (2) by teaching `_Ref_fn` to call-forward through `invoke` when it wraps a pointer-to-member.

Fixes GH-1089.
…y, and indirect_array (#988)

Co-authored-by: S. B. Tam <cpplearner@outlook.com>
Co-authored-by: Casey Carter <cartec69@gmail.com>
Co-authored-by: Stephan T. Lavavej <stl@microsoft.com>
* Removes workaround for missing `bit_cast` and mark `lerp` constexpr.

* Changes how `lerp` handles infinite inputs according to
  #65 (comment) and
  #65 (comment).

* Adds constexpr tests.

Co-authored-by: Stephan T. Lavavej <stl@microsoft.com>
...by transposing arguments to `_Iter_exchange_move`.

Fixes #1067
Co-authored-by: Casey Carter <Casey@Carter.net>
... for enregistration, to improve performance. Per a suggestion from Statementreply in the discussion at #1049 (comment).
Fixes #198.

Co-authored-by: Casey Carter <cacarter@microsoft.com>
Co-authored-by: Stephan T. Lavavej <stl@microsoft.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Co-authored-by: Stephan T. Lavavej <stl@microsoft.com>
Co-authored-by: Casey Carter <Casey@Carter.net>
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
Co-authored-by: Curtis J Bezault <curtbezault@gmail.com>
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Co-authored-by: Casey Carter <cartec69@gmail.com>
@fengjixuchui fengjixuchui merged commit 133ccd0 into fengjixuchui:master Aug 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.