Граф коммитов

438 Коммитов

Автор SHA1 Сообщение Дата
Alex Guteniev e7451b3f9d
test_atomic_wait.hpp: remove another timing assumption (#1193) 2020-08-14 14:35:49 -07:00
Casey Carter 02bf0cf685
/std:c++latest configs are /permissive or /permissive- (#1162)
So our test coverage won't be damaged when the compiler changes `/std:c++latest` to imply `/permissive-`. I do so by adding `/permissive-` to every `/std:c++latest` command line that doesn't yet have it, and then reverting one configuration in each matrix to `/permissive`. It seems sensible to me that the majority of our coverage should change from permissive to strict mode to reflect the change in compiler default.
2020-08-14 14:33:13 -07:00
Michael Schellenberger Costa 1e42166b78
Implement counted_iterator (#1083)
Co-authored-by: S. B. Tam <cpplearner@outlook.com>
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
Co-authored-by: Casey Carter <Casey@Carter.net>
2020-08-14 14:27:53 -07:00
Billy O'Neal 87dc1d3383
Guard noexcept annotated function pointer type for __cpp_noexcept_function_type. (#1150)
Resolves VSO-1166234.
2020-08-13 11:49:21 -07:00
Alex Guteniev f3ca37d67c
Implement atomic_ref (#2, p0019r8) (#843)
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>
2020-08-12 18:10:46 -07:00
Alex Guteniev f3bbb98e71
Move _ATOMIC_WAIT_ON_ADDRESS_STATICALLY_AVAILABLE (#1179) 2020-08-12 12:52:23 -07:00
Casey Carter ae1068e07b
<deque>: Use _Next_iter and _Prev_iter (#1161) 2020-08-12 12:51:26 -07:00
Casey Carter 7f29487be5
Implement ranges::uninitialized_move (#1137) 2020-08-12 12:47:52 -07:00
Casey Carter 4ce746ca4e
Implement ranges::sort (#1127) 2020-08-12 12:45:48 -07:00
statementreply 3224307ff6
<random>: Fix parameter initialization of piecewise_constant_distribution and piecewise_linear_distribution (#1032) 2020-08-12 12:37:36 -07:00
Stephan T. Lavavej ea02d35bdc
Use Standard_D16as_v4. (#1185) 2020-08-12 12:35:19 -07:00
Jonathan Emmett 1680ae7f0e
Remove noexcept from coroutine_handle<>::resume and operator() (#1182) 2020-08-11 15:04:41 -07:00
Billy O'Neal f437e98359
Add DisableThreadLibraryCalls to all satellite DLLs. (#1142) 2020-08-10 23:52:31 -07:00
Hamid Reza Arzaghi 19135668f4
Fix unnecessary self-move-assignments in deque erase(iter, iter) (#1148)
Fixes #1118.
2020-08-09 16:05:27 -07:00
Alex Guteniev 392fb6d857
Cache hardware thread count for <execution> (#1143)
Fixes #1134.

Co-authored-by: Casey Carter <cartec69@gmail.com>
Co-authored-by: Billy O'Neal <bion@microsoft.com>
2020-08-09 15:59:11 -07:00
Alex Guteniev bdf7710249
wait/notify atomic<shared_ptr<T>> (#52, P1644R0) (#1136)
Co-authored-by: Adam Bucior <35536269+AdamBucior@users.noreply.github.com>
2020-08-09 15:38:59 -07:00
Casey Carter af3db68781
partial_sort_copy bugfix (#1088)
Fixes #1086.
2020-08-09 15:28:43 -07:00
Casey Carter eb33f1a1e9
Implement ranges::lexicographical_compare (#1081) 2020-08-09 15:07:00 -07:00
Stephan T. Lavavej d83bc99312
Upgrade toolset to VS 2019 16.8 Preview 1 (#1153)
Fixes #1051.
2020-08-09 14:56:45 -07:00
Jonathan Caves e000d3feaf
Disable a libcxx test due to the impact of P0960R3 (#1138)
Disable some tests due to impact of P0960R3: allow initializing aggregates from a parenthesized list of values
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
Co-authored-by: Casey Carter <cartec69@gmail.com>
2020-08-05 14:36:08 -07:00
leejy12 cbfc5272c8
Update _MSVC_STL_UPDATE to August 2020 (#1144) 2020-08-05 00:21:15 -07:00
Stephan T. Lavavej 06c2c54358
Fix build warning "restarting link with /LTCG". (#1140) 2020-08-05 00:17:15 -07:00
Casey Carter 5d00b606b4
Implement ranges::merge (#1101) 2020-08-05 00:09:55 -07:00
Casey Carter 0eb754dedd
Implement ranges::next_permutation and ranges::prev_permutation (#1099) 2020-08-05 00:02:21 -07:00
Casey Carter 622b62a777
Implement ranges::reverse_copy (#1095)
Co-authored-by: Stephan T. Lavavej <stl@microsoft.com>
2020-08-04 23:51:25 -07:00
Alex Guteniev b74b6188b2
Remove timing assumption that causes test to fail spuriously (#1129) 2020-08-03 13:40:04 -07:00
Billy O'Neal b57b7685ff
Change CMakeLists.txt to default to our submodule'd vcpkg copy. (#1124) 2020-08-03 13:34:37 -07:00
Stephan T. Lavavej 12c684bba7
Cleanup std qualification and old bug citations (#1119) 2020-08-01 18:35:54 -07:00
Alex Guteniev e4b75dcd44
Implement std::atomic::wait (#593)
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>
2020-08-01 17:54:07 -07:00
Billy O'Neal 8ec6b33a92
P1001R2 execution::unseq (#1111)
Resolves #44.
2020-08-01 17:02:51 -07:00
Casey Carter a712fe5042
Enable tests Dev09_172666_tr1_tuple_odr and VSO_0000000_matching_npos_address (#1109) 2020-08-01 16:53:44 -07:00
Alex Guteniev 782cd650ec
<bit>: Fix countl_zero to switch between lzcnt and bsr correctly (#1108)
Fixes #1103.
2020-08-01 16:44:01 -07:00
Stephan T. Lavavej 57db210e30
Fix weak_ptr conversions, preserving control blocks for expired objects (#1104)
Fixes #1102.
2020-08-01 16:36:24 -07:00
Casey Carter e2912b6e48
Implement ranges::ssize (#1076) 2020-08-01 16:19:09 -07:00
Casey Carter e58a94505b
Implement ranges::nth_element (#1063) 2020-08-01 16:08:38 -07:00
Michael Schellenberger Costa accaf18978
Modernize ranges::swap_ranges and ranges::distance (#1062)
Co-authored-by: Casey Carter <Casey@Carter.net>
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2020-08-01 16:03:08 -07:00
Michael Schellenberger Costa 1ff3d1ef11
Optimize fill and fill_n for vector<bool> (#879)
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Co-authored-by: Stephan T. Lavavej <stl@microsoft.com>
2020-08-01 15:58:39 -07:00
ArtemSarmini 0381c25b10
<type_traits>: is_function simplification (#460)
Fixes #198.

Co-authored-by: Casey Carter <cacarter@microsoft.com>
Co-authored-by: Stephan T. Lavavej <stl@microsoft.com>
2020-08-01 15:29:40 -07:00
Casey Carter 4e97255b35
Comparison category types become aggregates (#1065)
... for enregistration, to improve performance. Per a suggestion from Statementreply in the discussion at https://github.com/microsoft/STL/pull/1049#discussion_r456298672.
2020-07-29 21:14:13 -07:00
Michael Schellenberger Costa 58a8a39b51
Implement ranges::rotate and ranges::rotate_copy (#1073)
Co-authored-by: Casey Carter <Casey@Carter.net>
2020-07-29 21:11:32 -07:00
Casey Carter 30777d5adf
Fix thinko in ranges::iter_swap (#1072)
...by transposing arguments to `_Iter_exchange_move`.

Fixes #1067
2020-07-29 20:57:47 -07:00
statementreply e9f56a6148
Finish P0811R3 midpoint and lerp (#1048)
* Removes workaround for missing `bit_cast` and mark `lerp` constexpr.

* Changes how `lerp` handles infinite inputs according to
  https://github.com/microsoft/STL/issues/65#issuecomment-563811523 and
  https://github.com/microsoft/STL/issues/65#issuecomment-564102550.

* Adds constexpr tests.

Co-authored-by: Stephan T. Lavavej <stl@microsoft.com>
2020-07-29 20:49:20 -07:00
Alex Guteniev 0e7b5d2509
<valarray>: Implement copies for slice_array, gslice_array, mask_array, 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>
2020-07-29 20:30:29 -07:00
Casey Carter 35ce1cf44a
Fix the interaction between _Pass_fn and invoke (#1091)
`_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.
2020-07-28 15:34:37 -07:00
Casey Carter 868cf267a0
Implement ranges::move_backward (#1053)
* Implement ranges::move_backward

Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
Co-authored-by: mnatsuhara <46756417+mnatsuhara@users.noreply.github.com>
2020-07-28 15:31:55 -07:00
Casey Carter 3659f3dc18
Implement Ranges Set Operations (#1044)
Includes the `mergeable` concept and algorithms `ranges::includes`, `ranges::set_union`, `ranges::set_intersection`, `ranges::set_difference`, and `ranges::set_symmetric_difference`.
2020-07-28 15:26:06 -07:00
Michael Schellenberger Costa f49ffafb5d
Uglify the current member of move_iterator (#1080) 2020-07-27 11:42:15 -07:00
Stephan T. Lavavej b2f1556d2a
Update .clang-format for Clang 10 (#1075)
* 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.
2020-07-27 11:38:12 -07:00
Michael Schellenberger Costa fc3df2f5b1
Modernize ranges::all_of and friends (#1061) 2020-07-27 11:34:50 -07:00
Michael Schellenberger Costa 5ada43e908
Modernize ranges::for_each (#1060) 2020-07-27 11:33:40 -07:00