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

81 Коммитов

Автор SHA1 Сообщение Дата
Alex Guteniev 7b199b235a
Auto-vectorize arrays `swap` (#4991)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2024-10-24 08:44:18 -07:00
A. Jiang de79d09d1a
Refactoring around `tuple-like`, `pair-like`, and `subrange` (#4983) 2024-10-11 21:27:15 -07:00
A. Jiang bbe8b6b2af
`<utility>`: Privatize `pair`'s internal non-Standard constructor (#4979) 2024-09-28 13:22:45 -07:00
Stephan T. Lavavej 6cb175ddf8
Toolset update: VS 2022 17.12 Preview 2, Clang 18.1.8 (#4947) 2024-09-11 20:13:13 -07:00
Casey Carter 7782684576
Casey's accumulated miscellaneous changes (#4900) 2024-08-25 11:27:23 -07:00
statementreply c4d0517185
Add `[[msvc::lifetimebound]]` to more min/max functions (#4838) 2024-08-07 23:07:04 -07:00
A. Jiang ecbc1efa09
Use `requires`-clauses for `pair` and `tuple` since C++20 (#4819) 2024-07-11 15:25:56 -07:00
Alex Guteniev 39dd5037ef
`<numeric>`: check for gcd / lcm overflows (#4776)
Co-authored-by: A. Jiang <de34@live.cn>
Co-authored-by: Stephan T. Lavavej <stl@microsoft.com>
2024-07-11 14:56:51 -07:00
Neil J George 4406e0e251
P2968R2 Make std::ignore A First-Class Object (#4777) 2024-07-05 00:11:41 -07:00
Spring Burst c8f45be42b
<utility>: Remove self swap check from pair. (#4674)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2024-05-20 17:12:55 -07:00
Alex Guteniev 697653d506
Refactor `<limits>` usage (#4634)
Co-authored-by: A. Jiang <de34@live.cn>
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2024-05-20 15:42:40 -07:00
Alex Guteniev 290a95bc6b
Help the compiler vectorize `std::iota` (#4627)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2024-04-26 17:10:18 -07:00
A. Jiang daeb0a63b1
Drop `inline`/`_INLINE_VAR` from templated `constexpr` variables in product and test codes (#4546)
Co-authored-by: Stephan T. Lavavej <stl@microsoft.com>
2024-04-09 14:05:30 -07:00
A. Jiang 4787efeae1
`<tuple>`, `<utility>`: Make `tuple`-related functions ADL-proof (#4488) 2024-03-19 15:57:56 -07:00
Stephan T. Lavavej 4d088fc77c
Toolset update: VS 2022 17.10 Preview 2, WinSDK 22621, CUDA 12.4.0 (#4475) 2024-03-15 22:06:09 -07:00
Stephan T. Lavavej f49ffd2e58
Cleanup compiler bug workarounds and their comments (#4362) 2024-02-06 02:52:46 -08:00
S. B. Tam 0c47a7cfc9
Enable `__cpp_lib_concepts` for EDG, part 3 (#4298)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2024-02-06 01:05:52 -08:00
S. B. Tam 446444e853
Enable `__cpp_lib_concepts` for EDG, part 1 (#4296)
Co-authored-by: Casey Carter <cacarter@microsoft.com>
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2024-02-01 15:23:06 -08:00
Stephan T. Lavavej 245e703942
Toolset update: VS 2022 17.9 Preview 2, Clang 17 (#4259) 2023-12-14 13:56:17 -08:00
Alex Guteniev 939513b9aa
Update preprocessor `#else` and `#endif` comment (#3950)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2023-09-21 12:42:29 -07:00
Casey Carter c3336fb9b4
Prepare for impending LLVM 17 release (#4014) 2023-09-14 12:14:16 -07:00
Alex Guteniev 9ad382e2f5
Update preprocessor `#else` comment in product code to clarify which mode is where (#3900)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2023-08-10 16:48:21 -07:00
Stephan T. Lavavej 92d050e02b
Drop `#pragma once` in STL headers (#3895) 2023-07-26 11:54:17 -07:00
clundro ef8baca38b
add [[msvc::intrinsic]] for some cast funcs. (#3664)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
Co-authored-by: A. Jiang <de34@live.cn>
2023-07-20 16:32:59 -07:00
Casey Carter e8562273f7
Remove some unnecessary clang-format hacks (#3768) 2023-06-15 02:14:47 -07:00
A. Jiang 5226b57d00
Workaround for non-_Ugly attribute tokens (#3760)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2023-06-15 01:57:51 -07:00
A. Jiang a4bb668f72
Move some components from upstream headers to downstream (#3719)
Co-authored-by: Casey Carter <cartec69@gmail.com>
2023-05-30 15:58:38 -07:00
Stephan T. Lavavej a62109595b
Toolset update: VS 2022 17.7 Preview 1 (#3711)
* PowerShell 7.3.4.

* New pool.

* VS 2022 17.7 Preview 1.

* Require Clang 16.

* Remove workaround for VSO-1753916 'C++23 tuple causes x86chk assertion: !"If lookup found RDSymbol before it should find something this time, too", ParseTree.cpp 10376'.

* Remove workarounds for VSO-1799670 "EDG rejects constexpr vector in debug mode with 'attempt to access expired storage' errors, part 3".

* Remove workarounds for LLVM-44833 "[concepts] deferred substitution into requirements of class template members not implemented".

* [llvm16] Clang has implemented P0960; unskip tests that now pass, and remove workaround in `P2474R2_views_repeat`.

* [llvm16] Clang now warns about overriding `/fp:strict` with `-ffp-contract`. Update `floating_point_model_matrix.lst` to silence these warnings.

* [llvm16] Fix redeclaration of `adjacent_transform_view` (atomic constraint expressions effectively cannot be reproduced since each utterance is distinct).

* [llvm16] Disambiguate `tuple` comparison operators.

* [llvm16] Workaround LLVM-62290, which has been fixed for Clang 17, in `<ranges>`.

* [llvm16] Remove workarounds for a couple of `TRANSITION, Clang 16` issues in `<ranges>` and `<type_traits>`.

* [llvm16] Perma-workaround unfiled clang bug in `P0896R4_views_take`.

* [llvm16 followup] Improve arrow comments.

* [llvm16 followup] We `_EXPORT_STD` both declarations and definitions.

* Disable UBSan to work around GH 3568 "Investigate why Clang/LLVM UBSan doesn't link".

* Guard `_addcarry_u64`/`_subborrow_u64` for Clang.

* `LDBL_DECIMAL_DIG` is now missing for Clang too.

* Although LLVM-46207 is still open, Clang now likes tgmath.h.

* Cite LLVM-62096 "Clang complains about concept depending on itself".

* Add workaround for LLVM-62762 "32-bit-only misoptimization of printf calls on Windows".

* clang-format 16, no manual changes.

The changes are almost entirely positive, with no horrible mangling,
and limited weirdness around `&`, `&&`, and `*`. No need for manual fixups.

* .clang-format: Update link to Clang 16.

* .clang-format: Sort defaults, no behavioral changes.

* .clang-format: Drop commented-out defaults, no behavioral changes.

`BreakBeforeInheritanceComma` and `BreakConstructorInitializersBeforeComma`
were never documented and aren't printed out by `-dump-config` anymore.

The weird empty `BasedOnStyle` isn't printed out by `-dump-config` anymore.

`ConstructorInitializerAllOnOneLineOrOnePerLine` and `AllowAllConstructorInitializersOnNextLine`
are now deprecated and aren't printed out by `-dump-config` anymore.

* .clang-format: `DeriveLineEnding` and `UseCRLF` were deprecated and fused into `LineEnding`, no behavioral changes.

* .clang-format: `AlignTrailingComments` is no longer a bool. Use the new options, no behavioral changes.

* .clang-format: `SortUsingDeclarations` (which we didn't customize) is no longer a bool, no behavioral changes.

* .clang-format: Add new defaults, no behavioral changes.

* .clang-format: `InsertNewlineAtEOF` is new, set it to `true`. Doesn't change any files right now.

* .clang-format: `RemoveSemicolon` is new, set it to `true`.

* clang-format 16, no manual changes - remove semicolons.

---------

Co-authored-by: Casey Carter <Casey@Carter.net>
2023-05-18 14:14:16 -07:00
A. Jiang 71e404b297
Expand `std::iter_swap` and remove `_Swap_adl` (#3700)
Also
- Move `std::iter_swap` from `<utility>` to `<algorithm>`.
- In `_Partition_by_median_guess_unchecked`, only evaluate `_Prev_iter(_Glast)` once.

Fixes #2692.
2023-05-18 13:33:42 -07:00
A. Jiang d3a7da7ace
Cite N4950 in headers and source files (#3686)
Towards #182.

- This PR drops all section numbers except for D.x in `<yvals_core.h>`. I decided to cite WG21-N4868 for C++20 deprecation.
- Some citations in `<format>` are intentionally not updated because WG21-P2675R1 and LWG-3631 are not implemented yet.
- Citations in test files are not updated, but I think I'll do it soon.
- Drive-by change: a comment for `move_only_function`'s move assignment operator explaining why it's `noexcept(false)` (see https://github.com/microsoft/STL/pull/3565#discussion_r1134755402 and https://github.com/microsoft/STL/issues/2278#issuecomment-943360927).

---------

Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
Co-authored-by: Casey Carter <cacarter@microsoft.com>
2023-05-18 11:38:57 -07:00
A. Jiang 90d87a50d9
Move numerous components from `<xstddef>` to other headers and reduce inclusion (#3623)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2023-04-13 19:57:56 -07:00
A. Jiang c0113f394f
Prefer `consteval` to `_CONSTEVAL`, enable `<source_location>` for Clang (#3584) 2023-03-28 12:05:29 -07:00
Stephan T. Lavavej 0c16581485
Cleanups: Consistently comment `enable_if_t` definitions (#3539) 2023-03-07 10:36:21 -08:00
A. Jiang 9051d5e948
Implement LWG-3821 `uses_allocator_construction_args` should have overload for `pair-like` (#3509)
Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
2023-03-03 15:26:36 -08:00
Jakub Mazurkiewicz 165e96f248
P2165R4: Compatibility Between `tuple`, `pair`, And tuple-like Objects (#3372)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
Co-authored-by: Casey Carter <Casey@Carter.net>
2023-02-25 23:49:35 -08:00
Igor Zhukov 9fb81686ff
Implement LWG-3865 Sorting a range of `pair`s (#3476)
Co-authored-by: Casey Carter <Casey@Carter.net>
2023-02-22 17:40:50 -08:00
Daniel Marshall 1868694e98
Implement P2474R2 `views::repeat` (#3142)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2023-01-27 19:05:45 -08:00
Jakub Mazurkiewicz 10722961ab
P2165R4: Compatibility Between `tuple`, `pair`, And tuple-like Objects (changes to `pair` only) (#3323)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2023-01-21 22:10:25 -08:00
Cameron DaCamara 48eb4a438c
add support for [[msvc::intrinsic]] (#3182)
Co-authored-by: Casey Carter <Casey@Carter.net>
2022-10-26 19:28:52 -07:00
Stephan T. Lavavej 2f8342a3a5
Toolset update: VS 2022 17.4 Preview 3, Clang 15 (#3155)
Co-authored-by: Casey Carter <Casey@Carter.net>
2022-10-14 13:00:48 -07:00
Stephan T. Lavavej 2f03bdf361
P2465R3 Standard Library Modules `std` And `std.compat` (#3108) 2022-09-19 14:47:02 -07:00
Igor Zhukov c23bbd898f
add `__forceinline` to `std::unreachable` instead of `inline` (#3055)
Co-authored-by: Alexander Bessonov <alexbav@hhdsoftware.com>
2022-08-26 17:43:53 -07:00
Stephan T. Lavavej febb6430ac
Fix `pair::swap(const pair&)` and `tuple::swap(const tuple&)` errors with `__declspec(dllexport)` (#3045) 2022-08-22 14:29:25 -07:00
A. Jiang 577269c56a
Implement P2445R1 `forward_like()` (#2974)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2022-08-05 16:40:30 -07:00
Stephan T. Lavavej 6b0d0fb51b
Use conditional `explicit` unconditionally (#2796) 2022-06-19 17:55:49 -07:00
A. Jiang 01a03dde0a
Untag dispatch `get` for `pair` (#2756)
Co-authored-by: Casey Carter <Casey@Carter.net>
2022-06-12 02:39:13 -07:00
A. Jiang 87b1f5d134
`<tuple>`: Becomes a core header (#2730) 2022-06-01 17:24:43 -07:00
Stephan T. Lavavej 9ccb781ce7
Scalarize `swap` and `ranges::swap` for arrays (#2700) 2022-05-05 02:44:14 -07:00
S. B. Tam f8748eb6d9
P2321R2 zip: Make `tuple`, `pair`, and `vector<bool>::reference` `indirectly_writable` (#2687)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2022-05-05 02:20:20 -07:00
Stephan T. Lavavej 39332e104d
Vectorize `swap` and `ranges::swap` for arrays (#2689) 2022-05-01 03:55:13 -07:00