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

143 Коммитов

Автор SHA1 Сообщение Дата
A. Jiang 1c3e0d6509
`<list>`, `<string>`: Remove allocator-moving tagged internal constructors (#4976)
Co-authored-by: Stephan T. Lavavej <stl@microsoft.com>
2024-09-28 13:16:15 -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
Igor Zhukov 184ce39eef
Remove `_NODISCARD_FRIEND` workaround (#4782)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2024-07-05 00:16:13 -07:00
A. Jiang d6b0352715
Use `requires`-clauses and concepts for container-like components since C++20 (#4718)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2024-06-27 13:15:26 -07:00
A. Jiang cce32f4119
Make `<string_view>` slimmer by default (#4633)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2024-05-30 09:17:42 -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
A. Jiang fe7f82e4ec
`<xstring>`: Make `char_traits::assign` not start lifetime of elements (#4613) 2024-04-26 16:09:51 -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 e0a75b3537
Implement LWG-3950 `std::basic_string_view` comparison operators are overspecified (#4510)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2024-03-28 10:21:31 -07:00
Tiago 64d9a599da
Initialize pointer in `basic_string::_Allocate_for_capacity` (#4474) 2024-03-15 22:53:15 -07:00
Stephan T. Lavavej 64e410c8d9
Toolset update: VS 2022 17.10 Preview 1 (#4392) 2024-02-16 12:32:41 -08:00
Stephan T. Lavavej f49ffd2e58
Cleanup compiler bug workarounds and their comments (#4362) 2024-02-06 02:52:46 -08:00
A. Jiang 2fa1641fb6
`static operator()` for stateless functors (#4358)
Co-authored-by: Casey Carter <cacarter@microsoft.com>
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2024-02-06 01:18:25 -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
A. Jiang 80e0909966
ADL-proof container operations for iterator pairs and comparators (#4258)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2024-01-17 03:26:36 -08:00
A. Jiang 9ab77b9864
`<vector>`, `<string>`: Avoid dereferencing null (fancy) pointers... (#4275)
... when calling `_Seek_to`/`_Unwrapped` on or comparing `vector` and `basic_string`'s iterators

Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2024-01-11 14:12:18 -08:00
Stephan T. Lavavej ca641a0eac
Defend sequence container constructors from bad CTAD (#4254) 2023-12-14 14:23:06 -08:00
Stephan T. Lavavej ae50dffa5f
Fix truncation warnings in `string`/`vector` iterator subtraction and `ranges::is_permutation` (#4237) 2023-12-07 08:52:26 -08:00
A. Jiang 21b16b4a8f
ADL-proof implementation of `erase_if` and related algorithms (#4217)
Co-authored-by: Stephan T. Lavavej <stl@microsoft.com>
2023-11-29 12:53:23 -08:00
Stephan T. Lavavej d15035deb3
Various cleanups: Simplify product code (#4121) 2023-10-25 16:53:25 -07:00
Stephan T. Lavavej 2df039ff04
Various cleanups: Comments and strings (#4117) 2023-10-25 16:43:07 -07:00
A. Jiang 36a6a3ec18
`<xstring>`: Use `memmove` in construction of `basic_string` when the source is a suitable contiguous range (#4073)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
Co-authored-by: Casey Carter <cartec69@gmail.com>
2023-10-14 12:03:47 -07:00
achabense 8d6922ae46
Lifetime cleanups for `basic_string` (#4047)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2023-10-14 11:51:05 -07:00
achabense 69ceca333c
Fix the `_Choose_pocca_v` branch in `basic_string::operator=(const&)` (#4031)
Co-authored-by: Casey Carter <cartec69@gmail.com>
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2023-09-21 12:50:12 -07:00
achabense 6f31505d1f
Cleanups and enhancements for `basic_string` (#3984) 2023-09-21 12:45:38 -07: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
achabense 21eca6fc97
Fix `string::assign` and `::resize_and_overwrite` under ASan (#3956)
Co-authored-by: Casey Carter <cacarter@microsoft.com>
2023-08-17 18:35:22 -07:00
Alex Guteniev 5df7834106
Use `string::resize_and_overwrite` in `bitset` to avoid buffer initialization (#3904) 2023-08-10 19:29:25 -07:00
achabense 29fc1c9158
Logic cleanups for `basic_string` (#3862)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
Co-authored-by: Casey Carter <cacarter@microsoft.com>
2023-08-10 19:20:47 -07:00
Stephan T. Lavavej 036ea5953b
Various cleanups (#3935) 2023-08-10 17:44:26 -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
Stephan T. Lavavej f70d767e3b
Remove unnecessary `typename`s in all remaining headers (#3894)
Co-authored-by: Casey Carter <cacarter@microsoft.com>
2023-07-26 11:51:57 -07:00
nicole mazzuca 8a93121d63
Fix `string::replace` under ASan (#3884)
Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2023-07-20 16:50:29 -07:00
Casey Carter 171066e7f8
Reallocate at least (#3864)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2023-07-13 19:23:56 -07:00
Casey Carter 40640c6df9
Deallocate at least (#3819)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2023-06-22 17:37:44 -07:00
A. Jiang 15aea9852b
Implement signature changes for `char_traits` in WG21-N2349 (#3739)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2023-06-15 02:48:13 -07:00
A. Jiang 1573c78657
`<xstring>`: Strengthen exception specification for `sv.compare("NTBS")` (#3738)
Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com>
Co-authored-by: Stephan T. Lavavej <stl@microsoft.com>
2023-06-15 02:22:47 -07:00
Stefan e37227e585
Utilize `allocate_at_least` (#3712)
Co-authored-by: A. Jiang <23228989+frederick-vs-ja@users.noreply.github.com>
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2023-06-15 02:16:24 -07:00
achabense 45111bbc67
Remove redundant template parameters for `_XX_iter_types` (#3765) 2023-06-15 02:12:53 -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 2df667edf8
Move `_Char_traits_eq` and `_Char_traits_lt` from `<xstring>` to `<regex>` (#3625) 2023-04-07 13:50:27 -07:00
Stephan T. Lavavej b660336b29
Cleanups: `#undef` macro hygiene (#3529) 2023-03-07 11:42:06 -08:00
Stephan T. Lavavej 1c60dc46b6
Cleanups: Split type and object definitions (#3526) 2023-03-07 11:37:54 -08:00
Stephan T. Lavavej 326473d595
Cleanups: Formatting and comments (#3523)
Co-authored-by: Jakub Mazurkiewicz <mazkuba3@gmail.com>
2023-03-07 11:33:51 -08:00
Casey Carter 3b79276ac2
Uncomment resolutions of applied LWG issues (#3461) 2023-02-13 18:35:55 -08:00
A. Jiang 1763113bd8
Eliminate spaces in `operator"" name()` (#3453)
Co-authored-by: S. B. Tam <cpplearner@outlook.com>
2023-02-13 17:04:55 -08:00
A. Jiang 4f5d13aebb
Speculatively implement LWG-3857 (basic_string_view conversions) (#3348)
Co-authored-by: S. B. Tam <cpplearner@outlook.com>
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2023-01-21 22:23:56 -08:00