From 35e44d2987873147ea1aa0eeacff542e67a0b9ad Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 16 May 2023 12:01:44 -0700 Subject: [PATCH 01/36] PowerShell 7.3.4. --- azure-devops/provision-image.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-devops/provision-image.ps1 b/azure-devops/provision-image.ps1 index c5731b52fb1..43d697251da 100644 --- a/azure-devops/provision-image.ps1 +++ b/azure-devops/provision-image.ps1 @@ -91,7 +91,7 @@ if ([string]::IsNullOrEmpty($AdminUserPassword)) { $PsExecPath = Join-Path $ExtractedPsToolsPath 'PsExec64.exe' # https://github.com/PowerShell/PowerShell/releases/latest - $PowerShellZipUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.3.3/PowerShell-7.3.3-win-x64.zip' + $PowerShellZipUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.3.4/PowerShell-7.3.4-win-x64.zip' Write-Host "Downloading: $PowerShellZipUrl" $ExtractedPowerShellPath = DownloadAndExtractZip -Url $PowerShellZipUrl $PwshPath = Join-Path $ExtractedPowerShellPath 'pwsh.exe' From f10337318990a27610a7c95f5922b11a55d208cd Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 16 May 2023 12:48:56 -0700 Subject: [PATCH 02/36] New pool. --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5baa036c05a..a23bd04bd61 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,7 +9,7 @@ variables: benchmarkBuildOutputLocation: 'D:\benchmark' pool: - name: 'StlBuild-2023-04-11T1428-Pool' + name: 'StlBuild-2023-05-16T1204-Pool' demands: EnableSpotVM -equals true pr: From 54958364e94da928c25438d5ecf771b70f2588bb Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 16 May 2023 12:51:10 -0700 Subject: [PATCH 03/36] VS 2022 17.7 Preview 1. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index af9dd095d39..4b80c9469c1 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,7 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem # How To Build With The Visual Studio IDE -1. Install Visual Studio 2022 17.6 Preview 3 or later. +1. Install Visual Studio 2022 17.7 Preview 1 or later. * Select "Windows 11 SDK (10.0.22000.0)" in the VS Installer. * We recommend selecting "C++ CMake tools for Windows" in the VS Installer. This will ensure that you're using supported versions of CMake and Ninja. @@ -157,7 +157,7 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem # How To Build With A Native Tools Command Prompt -1. Install Visual Studio 2022 17.6 Preview 3 or later. +1. Install Visual Studio 2022 17.7 Preview 1 or later. * Select "Windows 11 SDK (10.0.22000.0)" in the VS Installer. * We recommend selecting "C++ CMake tools for Windows" in the VS Installer. This will ensure that you're using supported versions of CMake and Ninja. From 91d499486f1ed156a3468483c2700ff8e8a8c57c Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 16 May 2023 12:57:51 -0700 Subject: [PATCH 04/36] Require Clang 16. --- stl/inc/yvals_core.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stl/inc/yvals_core.h b/stl/inc/yvals_core.h index 17f49fd68d6..0fbd7cba242 100644 --- a/stl/inc/yvals_core.h +++ b/stl/inc/yvals_core.h @@ -840,8 +840,8 @@ _EMIT_STL_ERROR(STL1002, "Unexpected compiler version, expected CUDA 11.6 or new #elif defined(__EDG__) // not attempting to detect __EDG_VERSION__ being less than expected #elif defined(__clang__) -#if __clang_major__ < 15 -_EMIT_STL_ERROR(STL1000, "Unexpected compiler version, expected Clang 15.0.0 or newer."); +#if __clang_major__ < 16 +_EMIT_STL_ERROR(STL1000, "Unexpected compiler version, expected Clang 16.0.0 or newer."); #endif // ^^^ old Clang ^^^ #elif defined(_MSC_VER) #if _MSC_VER < 1936 // Coarse-grained, not inspecting _MSC_FULL_VER From eb6b4db3a0613abc98e0f1eadfe62c46f0fe797f Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 16 May 2023 12:59:43 -0700 Subject: [PATCH 05/36] Remove workaround for VSO-1761088 "ICE when using a pack expansion to repeat a type N times". --- stl/inc/ranges | 4 ---- 1 file changed, 4 deletions(-) diff --git a/stl/inc/ranges b/stl/inc/ranges index 0d54666d9b3..f8530bff3d2 100644 --- a/stl/inc/ranges +++ b/stl/inc/ranges @@ -8832,11 +8832,7 @@ namespace ranges { template struct _Invoke_result_with_repeated_type_impl<_Fn, _Ty, index_sequence<_Indices...>> { -#if defined(__clang__) || defined(__EDG__) // TRANSITION, VSO-1761088 using type = invoke_result_t<_Fn, _Repeat_type<_Ty, _Indices>...>; -#else // ^^^ no workaround / workaround vvv - using type = decltype(_STD invoke(_STD declval<_Fn>(), _STD declval<_Repeat_type<_Ty, _Indices>>()...)); -#endif // ^^^ workaround ^^^ }; template From c26b76b3886e81d5bc0e37f742ad76aa4b5927ee Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 16 May 2023 13:02:41 -0700 Subject: [PATCH 06/36] 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'. --- stl/inc/tuple | 4 ---- 1 file changed, 4 deletions(-) diff --git a/stl/inc/tuple b/stl/inc/tuple index e1aaacbd28d..5c4be7a9144 100644 --- a/stl/inc/tuple +++ b/stl/inc/tuple @@ -771,7 +771,6 @@ public: } #if _HAS_CXX23 -#if defined(__clang__) || defined(__EDG__) // TRANSITION, VSO-1753916 template > static constexpr bool _Can_equal_compare_with_tuple_like_v = false; @@ -780,7 +779,6 @@ public: (requires(const tuple& _Left, const _Other& _Right) { { _STD get<_Indices>(_Left) == _STD get<_Indices>(_Right) } -> _Boolean_testable; } && ...); -#endif // ^^^ no workaround ^^^ template _NODISCARD constexpr bool _Equals_to_tuple_like(const _Other& _Right, index_sequence<_Indices...>) const { @@ -791,11 +789,9 @@ public: _NODISCARD_FRIEND constexpr bool operator==(const tuple& _Left, const _Other& _Right) { static_assert(1 + sizeof...(_Rest) == tuple_size_v<_Other>, "Cannot compare tuples of different sizes (N4928 [tuple.rel]/2)."); -#if defined(__clang__) || defined(__EDG__) // TRANSITION, VSO-1753916 static_assert(_Can_equal_compare_with_tuple_like_v<_Other>, "For all i, where 0 <= i < sizeof...(TTypes), get(t) == get(u) must be a valid expression (N4928 " "[tuple.rel]/2)."); -#endif // ^^^ no workaround ^^^ return _Left._Equals_to_tuple_like(_Right, make_index_sequence<1 + sizeof...(_Rest)>{}); } From afed4255b0d9d8f4c56976fcbe0213e775b47033 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 16 May 2023 13:06:32 -0700 Subject: [PATCH 07/36] Remove workarounds for VSO-1799670 "EDG rejects constexpr vector in debug mode with 'attempt to access expired storage' errors, part 3". --- tests/std/tests/P1004R2_constexpr_vector/test.cpp | 3 --- .../std/tests/P1004R2_constexpr_vector_bool/test.cpp | 9 --------- .../tests/VSO_0000000_allocator_propagation/test.cpp | 11 +++-------- 3 files changed, 3 insertions(+), 20 deletions(-) diff --git a/tests/std/tests/P1004R2_constexpr_vector/test.cpp b/tests/std/tests/P1004R2_constexpr_vector/test.cpp index 37f298cb379..a50b5383c62 100644 --- a/tests/std/tests/P1004R2_constexpr_vector/test.cpp +++ b/tests/std/tests/P1004R2_constexpr_vector/test.cpp @@ -326,9 +326,6 @@ constexpr bool test_interface() { assert(c2 == 6); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1799670 (expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { // modifiers vec range_constructed(begin(input), end(input)); diff --git a/tests/std/tests/P1004R2_constexpr_vector_bool/test.cpp b/tests/std/tests/P1004R2_constexpr_vector_bool/test.cpp index 07c4cba9c77..93d5eb5a140 100644 --- a/tests/std/tests/P1004R2_constexpr_vector_bool/test.cpp +++ b/tests/std/tests/P1004R2_constexpr_vector_bool/test.cpp @@ -352,9 +352,6 @@ constexpr bool test_interface() { assert(c2 == 32); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1799670 (expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { // modifiers vec range_constructed(begin(input), end(input)); @@ -445,9 +442,6 @@ constexpr bool test_interface() { assert(emplaced.size() == 22); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1799670 (expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { // GH-2440: we were incorrectly reallocating _before_ orphaning iterators // (resulting in UB) while inserting ranges of unknown length @@ -471,9 +465,6 @@ constexpr bool test_interface() { assert(equal(second.begin(), second.end(), begin(expected_second), end(expected_second))); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1799670 (expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { // erase vec erased{false, false, true, false, true}; erase(erased, false); diff --git a/tests/std/tests/VSO_0000000_allocator_propagation/test.cpp b/tests/std/tests/VSO_0000000_allocator_propagation/test.cpp index 9e20357992f..fb2a8b15466 100644 --- a/tests/std/tests/VSO_0000000_allocator_propagation/test.cpp +++ b/tests/std/tests/VSO_0000000_allocator_propagation/test.cpp @@ -306,15 +306,10 @@ _CONSTEXPR20 bool test_sequence() { test_sequence_copy_assign>(11, 22, 11); // POCCA, non-equal allocators test_sequence_copy_assign>(11, 22, 11); // POCCA, always-equal allocators -#if _HAS_CXX20 && defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1799670 (expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ - { - test_sequence_move_ctor(); + test_sequence_move_ctor(); - test_sequence_move_alloc_ctor(11, 11); // equal allocators - test_sequence_move_alloc_ctor(11, 22); // non-equal allocators - } + test_sequence_move_alloc_ctor(11, 11); // equal allocators + test_sequence_move_alloc_ctor(11, 22); // non-equal allocators test_sequence_move_assign>(11, 11, 11); // non-POCMA, equal allocators test_sequence_move_assign>(11, 22, 22); // non-POCMA, non-equal allocators From 989220dc7d885ba4a3fcff3a94a73c304a5c8d68 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 16 May 2023 13:22:18 -0700 Subject: [PATCH 08/36] Remove workarounds for LLVM-44833 "[concepts] deferred substitution into requirements of class template members not implemented". --- stl/inc/xutility | 96 ------------------------------------------------ 1 file changed, 96 deletions(-) diff --git a/stl/inc/xutility b/stl/inc/xutility index 9ed0ea2df90..b08f25d5a82 100644 --- a/stl/inc/xutility +++ b/stl/inc/xutility @@ -3539,14 +3539,8 @@ namespace ranges { } public: -#ifdef __clang__ // TRANSITION, LLVM-44833 - template - _NODISCARD constexpr bool empty() - requires sized_range<_Dx> || forward_range<_Dx> -#else // ^^^ workaround / no workaround vvv _NODISCARD constexpr bool empty() requires sized_range<_Derived> || forward_range<_Derived> -#endif // TRANSITION, LLVM-44833 { auto& _Self = _Cast(); if constexpr (sized_range<_Derived>) { @@ -3556,14 +3550,8 @@ namespace ranges { } } -#ifdef __clang__ // TRANSITION, LLVM-44833 - template - _NODISCARD constexpr bool empty() const - requires sized_range || forward_range -#else // ^^^ workaround / no workaround vvv _NODISCARD constexpr bool empty() const requires sized_range || forward_range -#endif // TRANSITION, LLVM-44833 { auto& _Self = _Cast(); if constexpr (sized_range) { @@ -3574,138 +3562,72 @@ namespace ranges { } #if _HAS_CXX23 -#ifdef __clang__ // TRANSITION, LLVM-44833 - template - _NODISCARD constexpr auto cbegin() - requires input_range<_Dx> -#else // ^^^ workaround / no workaround vvv _NODISCARD constexpr auto cbegin() requires input_range<_Derived> -#endif // TRANSITION, LLVM-44833 { return _RANGES cbegin(_Cast()); } -#ifdef __clang__ // TRANSITION, LLVM-44833 - template - _NODISCARD constexpr auto cbegin() const - requires input_range -#else // ^^^ workaround / no workaround vvv _NODISCARD constexpr auto cbegin() const requires input_range -#endif // TRANSITION, LLVM-44833 { return _RANGES cbegin(_Cast()); } -#ifdef __clang__ // TRANSITION, LLVM-44833 - template - _NODISCARD constexpr auto cend() - requires input_range<_Dx> -#else // ^^^ workaround / no workaround vvv _NODISCARD constexpr auto cend() requires input_range<_Derived> -#endif // TRANSITION, LLVM-44833 { return _RANGES cend(_Cast()); } -#ifdef __clang__ // TRANSITION, LLVM-44833 - template - _NODISCARD constexpr auto cend() const - requires input_range -#else // ^^^ workaround / no workaround vvv _NODISCARD constexpr auto cend() const requires input_range -#endif // TRANSITION, LLVM-44833 { return _RANGES cend(_Cast()); } #endif // _HAS_CXX23 -#ifdef __clang__ // TRANSITION, LLVM-44833 - template - constexpr explicit operator bool() - requires _Can_empty<_Dx> -#else // ^^^ workaround / no workaround vvv constexpr explicit operator bool() requires _Can_empty<_Derived> -#endif // TRANSITION, LLVM-44833 { return !_RANGES empty(_Cast()); } -#ifdef __clang__ // TRANSITION, LLVM-44833 - template - constexpr explicit operator bool() const - requires _Can_empty -#else // ^^^ workaround / no workaround vvv constexpr explicit operator bool() const requires _Can_empty -#endif // TRANSITION, LLVM-44833 { return !_RANGES empty(_Cast()); } -#ifdef __clang__ // TRANSITION, LLVM-44833 - template - _NODISCARD constexpr auto data() - requires contiguous_iterator> -#else // ^^^ workaround / no workaround vvv _NODISCARD constexpr auto data() requires contiguous_iterator> -#endif // TRANSITION, LLVM-44833 { return _STD to_address(_RANGES begin(_Cast())); } -#ifdef __clang__ // TRANSITION, LLVM-44833 - template - _NODISCARD constexpr auto data() const - requires range && contiguous_iterator> -#else // ^^^ workaround / no workaround vvv _NODISCARD constexpr auto data() const requires range && contiguous_iterator> -#endif // TRANSITION, LLVM-44833 { return _STD to_address(_RANGES begin(_Cast())); } -#ifdef __clang__ // TRANSITION, LLVM-44833 - template - _NODISCARD constexpr auto size() - requires forward_range<_Dx> && sized_sentinel_for, iterator_t<_Dx>> -#else // ^^^ workaround / no workaround vvv _NODISCARD constexpr auto size() requires forward_range<_Derived> && sized_sentinel_for, iterator_t<_Derived>> -#endif // TRANSITION, LLVM-44833 { auto& _Self = _Cast(); return _STD _To_unsigned_like(_RANGES end(_Self) - _RANGES begin(_Self)); } -#ifdef __clang__ // TRANSITION, LLVM-44833 - template - _NODISCARD constexpr auto size() const - requires forward_range && sized_sentinel_for, iterator_t> -#else // ^^^ workaround / no workaround vvv _NODISCARD constexpr auto size() const requires forward_range && sized_sentinel_for, iterator_t> -#endif // TRANSITION, LLVM-44833 { auto& _Self = _Cast(); return _STD _To_unsigned_like(_RANGES end(_Self) - _RANGES begin(_Self)); } -#ifdef __clang__ // TRANSITION, LLVM-44833 - template - _NODISCARD constexpr decltype(auto) front() - requires forward_range<_Dx> -#else // ^^^ workaround / no workaround vvv _NODISCARD constexpr decltype(auto) front() requires forward_range<_Derived> -#endif // TRANSITION, LLVM-44833 { auto& _Self = _Cast(); #if _CONTAINER_DEBUG_LEVEL > 0 @@ -3714,14 +3636,8 @@ namespace ranges { return *_RANGES begin(_Self); } -#ifdef __clang__ // TRANSITION, LLVM-44833 - template - _NODISCARD constexpr decltype(auto) front() const - requires forward_range -#else // ^^^ workaround / no workaround vvv _NODISCARD constexpr decltype(auto) front() const requires forward_range -#endif // TRANSITION, LLVM-44833 { auto& _Self = _Cast(); #if _CONTAINER_DEBUG_LEVEL > 0 @@ -3730,14 +3646,8 @@ namespace ranges { return *_RANGES begin(_Self); } -#ifdef __clang__ // TRANSITION, LLVM-44833 - template - _NODISCARD constexpr decltype(auto) back() - requires bidirectional_range<_Dx> && common_range<_Dx> -#else // ^^^ workaround / no workaround vvv _NODISCARD constexpr decltype(auto) back() requires bidirectional_range<_Derived> && common_range<_Derived> -#endif // TRANSITION, LLVM-44833 { auto& _Self = _Cast(); #if _CONTAINER_DEBUG_LEVEL > 0 @@ -3747,14 +3657,8 @@ namespace ranges { return *--_Last; } -#ifdef __clang__ // TRANSITION, LLVM-44833 - template - _NODISCARD constexpr decltype(auto) back() const - requires bidirectional_range && common_range -#else // ^^^ workaround / no workaround vvv _NODISCARD constexpr decltype(auto) back() const requires bidirectional_range && common_range -#endif // TRANSITION, LLVM-44833 { auto& _Self = _Cast(); #if _CONTAINER_DEBUG_LEVEL > 0 From 82c7cc52e334f7888a365e32a0a292ec3b2c692c Mon Sep 17 00:00:00 2001 From: Casey Carter Date: Mon, 15 May 2023 13:50:23 -0700 Subject: [PATCH 09/36] [llvm16] Clang has implemented P0960; unskip tests that now pass, and remove workaround in `P2474R2_views_repeat`. --- tests/libcxx/expected_results.txt | 5 ----- tests/std/tests/P2474R2_views_repeat/test.cpp | 9 --------- 2 files changed, 14 deletions(-) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index c5e1ab30823..6a26b567718 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -413,9 +413,6 @@ std/utilities/function.objects/func.wrap/func.wrap.func/noncopyable_return_type. # LLVM-46207 Clang's tgmath.h interferes with the UCRT's tgmath.h std/depr/depr.c.headers/tgmath_h.pass.cpp:1 FAIL -# Clang doesn't implement P0960 "Initializing Aggregates With Parentheses" -std/ranges/range.factories/range.iota.view/sentinel/ctor.value.pass.cpp:1 FAIL - # *** CLANG ISSUES, NOT YET ANALYZED *** # Clang doesn't enable sized deallocation by default. Should we add -fsized-deallocation or do something else? @@ -1003,8 +1000,6 @@ std/input.output/iostream.format/quoted.manip/quoted_traits.compile.pass.cpp FAI std/iterators/iterator.requirements/iterator.concepts/iterator.concept.random.access/contiguous_iterator.compile.pass.cpp FAIL std/iterators/iterator.requirements/iterator.cust/iterator.cust.move/iter_rvalue_reference_t.compile.pass.cpp FAIL std/iterators/iterator.requirements/iterator.cust/iterator.cust.swap/iter_swap.pass.cpp FAIL -std/iterators/predef.iterators/iterators.common/iterator_traits.compile.pass.cpp:1 FAIL -std/iterators/predef.iterators/iterators.common/plus_plus.pass.cpp:1 FAIL std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_gt.pass.cpp FAIL std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_gte.pass.cpp FAIL std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_lte.pass.cpp FAIL diff --git a/tests/std/tests/P2474R2_views_repeat/test.cpp b/tests/std/tests/P2474R2_views_repeat/test.cpp index ba1f542495f..a264b35d68f 100644 --- a/tests/std/tests/P2474R2_views_repeat/test.cpp +++ b/tests/std/tests/P2474R2_views_repeat/test.cpp @@ -286,15 +286,6 @@ struct forward_tester { struct tuple_tester { forward_tester y; forward_tester z; - -#ifdef __clang__ // TRANSITION, Clang needs to implement P0960R3 -#ifdef __cpp_aggregate_paren_init -#error Remove this workaround -#else // ^^^ Workaround is useless / workaround is useful vvv - template - constexpr tuple_tester(T&& a, U&& b) : y{forward(a)}, z{forward(b)} {} -#endif // __cpp_aggregate_paren_init -#endif // __clang__ }; constexpr bool test() { From adc5d0cc6057a499c058b2a1fcf3634aa952adc7 Mon Sep 17 00:00:00 2001 From: Casey Carter Date: Mon, 15 May 2023 13:52:18 -0700 Subject: [PATCH 10/36] [llvm16] Clang now warns about overriding `/fp:strict` with `-ffp-contract`. Update `floating_point_model_matrix.lst` to silence these warnings. --- tests/std/tests/floating_point_model_matrix.lst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/std/tests/floating_point_model_matrix.lst b/tests/std/tests/floating_point_model_matrix.lst index 8ce4465c0f5..617600f52fe 100644 --- a/tests/std/tests/floating_point_model_matrix.lst +++ b/tests/std/tests/floating_point_model_matrix.lst @@ -11,9 +11,9 @@ PM_CL="/Od /MDd" PM_CL="/O2 /MD /permissive-" PM_CL="/O2 /MT /GL" # TRANSITION, -Wno-unused-command-line-argument is needed for the internal test harness -PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing -Wno-unqualified-std-cast-call -Wno-unused-command-line-argument /Od /MTd" -PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing -Wno-unqualified-std-cast-call -Wno-unused-command-line-argument /O2 /MT" -PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing -Wno-unqualified-std-cast-call -Wno-unused-command-line-argument /O2 /MD /Oi-" +PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing -Wno-unqualified-std-cast-call -Wno-unused-command-line-argument -Wno-overriding-t-option /Od /MTd" +PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing -Wno-unqualified-std-cast-call -Wno-unused-command-line-argument -Wno-overriding-t-option /O2 /MT" +PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing -Wno-unqualified-std-cast-call -Wno-unused-command-line-argument -Wno-overriding-t-option /O2 /MD /Oi-" RUNALL_CROSSLIST PM_CL="" PM_CL="/arch:IA32" From 2ba87134af4a22185132d45be222d655e4e3bb24 Mon Sep 17 00:00:00 2001 From: Casey Carter Date: Mon, 15 May 2023 13:53:33 -0700 Subject: [PATCH 11/36] [llvm16] Fix redeclaration of `adjacent_transform_view` (atomic constraint expressions effectively cannot be reproduced since each utterance is distinct). --- stl/inc/ranges | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/stl/inc/ranges b/stl/inc/ranges index f8530bff3d2..757feaef5ad 100644 --- a/stl/inc/ranges +++ b/stl/inc/ranges @@ -8839,6 +8839,16 @@ namespace ranges { using _Invoke_result_with_repeated_type = typename _Invoke_result_with_repeated_type_impl<_Fn, _Ty, make_index_sequence<_Nx>>::type; + template + concept _Adjacent_transform_constraints = + (_Nx > 0) && forward_range<_Vw> && view<_Vw> && is_object_v<_Fn> && move_constructible<_Fn> + && _Regular_invocable_with_repeated_type<_Fn&, range_reference_t<_Vw>, _Nx> + && _Can_reference<_Invoke_result_with_repeated_type<_Fn&, range_reference_t<_Vw>, _Nx>>; + + _EXPORT_STD template + requires _Adjacent_transform_constraints<_Vw, _Fn, _Nx> + class adjacent_transform_view; + _EXPORT_STD template requires view<_Vw> && (_Nx > 0) class adjacent_view : public view_interface> { @@ -8854,12 +8864,9 @@ namespace ranges { private: friend adjacent_view; - template - requires view<_Vw2> && (_Nx2 > 0) - && is_object_v<_Fn> && _Regular_invocable_with_repeated_type<_Fn&, range_reference_t<_Vw2>, _Nx2> - && _Can_reference<_Invoke_result_with_repeated_type<_Fn&, range_reference_t<_Vw2>, _Nx2>> + template + requires _Adjacent_transform_constraints<_Vw2, _Fn, _Nx2> friend class adjacent_transform_view; - using _Base = _Maybe_const<_Const, _Vw>; using _Base_iterator = iterator_t<_Base>; @@ -9220,10 +9227,8 @@ namespace ranges { _EXPORT_STD inline constexpr _Adjacent_fn<2> pairwise; } // namespace views - _EXPORT_STD template - requires view<_Vw> && (_Nx > 0) - && is_object_v<_Fn> && _Regular_invocable_with_repeated_type<_Fn&, range_reference_t<_Vw>, _Nx> - && _Can_reference<_Invoke_result_with_repeated_type<_Fn&, range_reference_t<_Vw>, _Nx>> + template + requires _Adjacent_transform_constraints<_Vw, _Fn, _Nx> class adjacent_transform_view : public view_interface> { private: using _Inner_view = adjacent_view<_Vw, _Nx>; From 4e76078fd6aa7785ec8822e639a54f16c4a06845 Mon Sep 17 00:00:00 2001 From: Casey Carter Date: Mon, 15 May 2023 17:43:51 -0700 Subject: [PATCH 12/36] [llvm16] Disambiguate `tuple` comparison operators. --- stl/inc/tuple | 45 ++++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/stl/inc/tuple b/stl/inc/tuple index 5c4be7a9144..ff184b9f606 100644 --- a/stl/inc/tuple +++ b/stl/inc/tuple @@ -189,7 +189,7 @@ inline constexpr bool _Can_construct_values_from_tuple_like_v, #ifdef __clang__ // TRANSITION, LLVM-59827 template -concept _Can_construct_from_tuple_like = _Tuple_like<_TupleLike> && _Different_from<_TupleLike, _Tuple> +concept _Can_construct_from_tuple_like = _Different_from<_TupleLike, _Tuple> && _Tuple_like<_TupleLike> && (!_Is_subrange_v>) && (tuple_size_v<_Tuple> == tuple_size_v>) && _Can_construct_values_from_tuple_like_v<_Tuple, _TupleLike> @@ -214,6 +214,9 @@ struct _Three_way_comparison_result_with_tuple_like, _UTuple, template using _Three_way_comparison_result_with_tuple_like_t = typename _Three_way_comparison_result_with_tuple_like<_TTuple, _UTuple>::type; + +template +concept _Tuple_like_non_tuple = (!_Is_specialization_v<_Ty, tuple>) && _Tuple_like<_Ty>; #endif // _HAS_CXX23 && defined(__cpp_lib_concepts) template <> @@ -224,8 +227,8 @@ public: constexpr tuple(const tuple&) noexcept /* strengthened */ {} // TRANSITION, ABI: should be defaulted #if _HAS_CXX23 && defined(__cpp_lib_concepts) - template <_Tuple_like _Other> - requires _Different_from<_Other, tuple> && (tuple_size_v> == 0) + template <_Different_from _Other> + requires _Tuple_like<_Other> && (tuple_size_v> == 0) constexpr tuple(_Other&&) noexcept /* strengthened */ {} #endif // _HAS_CXX23 && defined(__cpp_lib_concepts) @@ -236,8 +239,8 @@ public: _CONSTEXPR20 tuple(allocator_arg_t, const _Alloc&, const tuple&) noexcept /* strengthened */ {} #if _HAS_CXX23 && defined(__cpp_lib_concepts) - template - requires _Different_from<_Other, tuple> && (tuple_size_v> == 0) + template _Other> + requires _Tuple_like<_Other> && (tuple_size_v> == 0) constexpr tuple(allocator_arg_t, const _Alloc&, _Other&&) noexcept /* strengthened */ {} #endif // _HAS_CXX23 && defined(__cpp_lib_concepts) @@ -254,14 +257,14 @@ public: } #ifdef __cpp_lib_concepts - template <_Tuple_like _Other> - requires _Different_from<_Other, tuple> && (tuple_size_v> == 0) + template <_Different_from _Other> + requires _Tuple_like<_Other> && (tuple_size_v> == 0) constexpr tuple& operator=(_Other&&) noexcept /* strengthened */ { return *this; } - template <_Tuple_like _Other> - requires _Different_from<_Other, tuple> && (tuple_size_v> == 0) + template <_Different_from _Other> + requires _Tuple_like<_Other> && (tuple_size_v> == 0) constexpr const tuple& operator=(_Other&&) const noexcept /* strengthened */ { return *this; } @@ -288,13 +291,13 @@ public: #endif // ^^^ !defined(__cpp_lib_concepts) ^^^ #if _HAS_CXX23 && defined(__cpp_lib_concepts) - template <_Tuple_like _Other> + template <_Tuple_like_non_tuple _Other> _NODISCARD_FRIEND constexpr bool operator==(const tuple&, const _Other&) noexcept /* strengthened */ { static_assert(tuple_size_v<_Other> == 0, "Cannot compare tuples of different sizes (N4928 [tuple.rel]/2)."); return true; } - template <_Tuple_like _Other> + template <_Tuple_like_non_tuple _Other> requires (tuple_size_v> == 0) _NODISCARD_FRIEND constexpr strong_ordering operator<=>(const tuple&, const _Other&) noexcept /* strengthened */ { return strong_ordering::equal; @@ -433,8 +436,8 @@ public: #ifdef __clang__ // TRANSITION, LLVM-59827 template , int> = 0> #else // ^^^ workaround / no workaround vvv - template <_Tuple_like _Other> - requires _Different_from<_Other, tuple> && (!_Is_subrange_v>) + template <_Different_from _Other> + requires _Tuple_like<_Other> && (!_Is_subrange_v>) && (1 + sizeof...(_Rest) == tuple_size_v>) && _Can_construct_values_from_tuple_like_v && (sizeof...(_Rest) != 0 || (!is_convertible_v<_Other, _This> && !is_constructible_v<_This, _Other>) ) @@ -541,8 +544,8 @@ public: #ifdef __clang__ // TRANSITION, LLVM-59827 template , int> = 0> #else // ^^^ workaround / no workaround vvv - template - requires _Different_from<_Other, tuple> && (!_Is_subrange_v>) + template _Other> + requires _Tuple_like<_Other> && (!_Is_subrange_v>) && (1 + sizeof...(_Rest) == tuple_size_v>) && _Can_construct_values_from_tuple_like_v && (sizeof...(_Rest) != 0 || (!is_convertible_v<_Other, _This> && !is_constructible_v<_This, _Other>) ) @@ -711,8 +714,8 @@ public: ((void) (_STD get<_Indices>(*this) = _STD get<_Indices>(_STD forward<_Other>(_Right))), ...); } - template <_Tuple_like _Other> - requires _Different_from<_Other, tuple> && (!_Is_subrange_v>) + template <_Different_from _Other> + requires _Tuple_like<_Other> && (!_Is_subrange_v>) && (1 + sizeof...(_Rest) == tuple_size_v>) && _Can_assign_values_from_tuple_like_v constexpr tuple& operator=(_Other&& _Right) { @@ -720,8 +723,8 @@ public: return *this; } - template <_Tuple_like _Other> - requires _Different_from<_Other, tuple> && (!_Is_subrange_v>) + template <_Different_from _Other> + requires _Tuple_like<_Other> && (!_Is_subrange_v>) && (1 + sizeof...(_Rest) == tuple_size_v>) && _Can_assign_values_from_tuple_like_v constexpr const tuple& operator=(_Other&& _Right) const { @@ -785,7 +788,7 @@ public: return ((_STD get<_Indices>(*this) == _STD get<_Indices>(_Right)) && ...); } - template <_Tuple_like _Other> + template <_Tuple_like_non_tuple _Other> _NODISCARD_FRIEND constexpr bool operator==(const tuple& _Left, const _Other& _Right) { static_assert(1 + sizeof...(_Rest) == tuple_size_v<_Other>, "Cannot compare tuples of different sizes (N4928 [tuple.rel]/2)."); @@ -803,7 +806,7 @@ public: return _Result; } - template <_Tuple_like _Other> + template <_Tuple_like_non_tuple _Other> _NODISCARD_FRIEND constexpr auto operator<=>(const tuple& _Left, const _Other& _Right) -> _Three_way_comparison_result_with_tuple_like_t { return _Left._Three_way_compare_with_tuple_like(_Right, make_index_sequence<1 + sizeof...(_Rest)>{}); From e99c8cc91dba5c3ecb14d91edad32514fb9df4e6 Mon Sep 17 00:00:00 2001 From: Casey Carter Date: Mon, 15 May 2023 20:24:31 -0700 Subject: [PATCH 13/36] [llvm16] Workaround LLVM-62290, which has been fixed for Clang 17, in ``. --- stl/inc/ranges | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stl/inc/ranges b/stl/inc/ranges index 757feaef5ad..b6e8c46e07f 100644 --- a/stl/inc/ranges +++ b/stl/inc/ranges @@ -8864,9 +8864,13 @@ namespace ranges { private: friend adjacent_view; +#ifdef __clang__ // TRANSITION, Clang 17 + public: +#else // ^^^ Clang / not Clang vvv template requires _Adjacent_transform_constraints<_Vw2, _Fn, _Nx2> friend class adjacent_transform_view; +#endif // TRANSITION, Clang 17 using _Base = _Maybe_const<_Const, _Vw>; using _Base_iterator = iterator_t<_Base>; From 96daa845084ae0a19dd7fde73397003be0898bf8 Mon Sep 17 00:00:00 2001 From: Casey Carter Date: Tue, 16 May 2023 11:24:02 -0700 Subject: [PATCH 14/36] [llvm16] Remove workarounds for a couple of `TRANSITION, Clang 16` issues in `` and ``. --- stl/inc/ranges | 5 +---- stl/inc/type_traits | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/stl/inc/ranges b/stl/inc/ranges index b6e8c46e07f..7b3a0f221e5 100644 --- a/stl/inc/ranges +++ b/stl/inc/ranges @@ -9548,10 +9548,7 @@ namespace ranges { template _NODISCARD constexpr auto operator()(_Rng&&, _Fn&& _Func) const noexcept(noexcept(views::zip_transform(_STD forward<_Fn>(_Func)))) - requires (_Nx == 0) -#ifndef __clang__ // TRANSITION, Clang 16 - && requires { views::zip_transform(_STD forward<_Fn>(_Func)); } -#endif // __clang__ + requires (_Nx == 0) && requires { views::zip_transform(_STD forward<_Fn>(_Func)); } { return views::zip_transform(_STD forward<_Fn>(_Func)); } diff --git a/stl/inc/type_traits b/stl/inc/type_traits index 3d26f56f401..14d04769e75 100644 --- a/stl/inc/type_traits +++ b/stl/inc/type_traits @@ -747,8 +747,8 @@ struct has_unique_object_representations : bool_constant<__has_unique_object_rep _EXPORT_STD template _INLINE_VAR constexpr bool has_unique_object_representations_v = __has_unique_object_representations(_Ty); -// TRANSITION, Clang 16 and VSO-1690654 -#if defined(__clang__) || defined(__EDG__) +// TRANSITION, VSO-1690654 +#ifdef __EDG__ template struct _Is_aggregate_impl : bool_constant<__is_aggregate(_Ty)> {}; From 47d4d1b9061b4aacbe4b6beaf512c5272d9694d6 Mon Sep 17 00:00:00 2001 From: Casey Carter Date: Tue, 16 May 2023 12:48:49 -0700 Subject: [PATCH 15/36] [llvm16] Perma-workaround unfiled clang bug in `P0896R4_views_take`. --- tests/std/tests/P0896R4_views_take/test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/std/tests/P0896R4_views_take/test.cpp b/tests/std/tests/P0896R4_views_take/test.cpp index b497e6969c6..8bcca019eee 100644 --- a/tests/std/tests/P0896R4_views_take/test.cpp +++ b/tests/std/tests/P0896R4_views_take/test.cpp @@ -603,8 +603,8 @@ void test_lwg3737() { static_assert(!ranges::sized_range); istringstream stream{"0 1 42 1729"}; - auto rng = - read_some_int_range{counted_iterator{istream_iterator{stream}, 4}, default_sentinel} | views::take(2); + read_some_int_range r{counted_iterator{istream_iterator{stream}, 4}, default_sentinel}; + auto rng = views::take(std::move(r), 2); using result_range = decltype(rng); static_assert( From 262b0df846dcf4549b085b6640e85219a9abd858 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 16 May 2023 13:46:45 -0700 Subject: [PATCH 16/36] [llvm16 followup] Improve arrow comments. --- stl/inc/ranges | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stl/inc/ranges b/stl/inc/ranges index 7b3a0f221e5..d82649bd7a5 100644 --- a/stl/inc/ranges +++ b/stl/inc/ranges @@ -8866,11 +8866,11 @@ namespace ranges { #ifdef __clang__ // TRANSITION, Clang 17 public: -#else // ^^^ Clang / not Clang vvv +#else // ^^^ workaround / no workaround vvv template requires _Adjacent_transform_constraints<_Vw2, _Fn, _Nx2> friend class adjacent_transform_view; -#endif // TRANSITION, Clang 17 +#endif // ^^^ no workaround ^^^ using _Base = _Maybe_const<_Const, _Vw>; using _Base_iterator = iterator_t<_Base>; From f98474bc997e619719a3687ac8d5d28b79c2fbeb Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 16 May 2023 13:47:13 -0700 Subject: [PATCH 17/36] [llvm16 followup] We `_EXPORT_STD` both declarations and definitions. --- stl/inc/ranges | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stl/inc/ranges b/stl/inc/ranges index d82649bd7a5..bc55e10643a 100644 --- a/stl/inc/ranges +++ b/stl/inc/ranges @@ -9231,7 +9231,7 @@ namespace ranges { _EXPORT_STD inline constexpr _Adjacent_fn<2> pairwise; } // namespace views - template + _EXPORT_STD template requires _Adjacent_transform_constraints<_Vw, _Fn, _Nx> class adjacent_transform_view : public view_interface> { private: From 56e867ac64c6e30899a9d5d4fca5a7b2411c6e9e Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 16 May 2023 17:20:15 -0700 Subject: [PATCH 18/36] Disable UBSan to work around GH 3568 "Investigate why Clang/LLVM UBSan doesn't link". --- tests/utils/stl/test/features.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/utils/stl/test/features.py b/tests/utils/stl/test/features.py index 5a8adf8e64c..21117313844 100644 --- a/tests/utils/stl/test/features.py +++ b/tests/utils/stl/test/features.py @@ -49,7 +49,8 @@ def getDefaultFeatures(config, litConfig): DEFAULT_FEATURES.append(Feature(name='x86')) elif litConfig.target_arch.casefold() == 'x64'.casefold(): - DEFAULT_FEATURES.append(Feature(name='ubsan')) + # TRANSITION, GH-3568 + # DEFAULT_FEATURES.append(Feature(name='ubsan')) DEFAULT_FEATURES.append(Feature(name='edg')) DEFAULT_FEATURES.append(Feature(name='arch_avx2')) DEFAULT_FEATURES.append(Feature(name='x64')) From eacf35ba02ec176b182608d08d3ae71f113ca6fe Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 16 May 2023 18:43:46 -0700 Subject: [PATCH 19/36] Guard `_addcarry_u64`/`_subborrow_u64` for Clang. --- stl/inc/__msvc_int128.hpp | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/stl/inc/__msvc_int128.hpp b/stl/inc/__msvc_int128.hpp index d0bb3167b3e..193d594fd54 100644 --- a/stl/inc/__msvc_int128.hpp +++ b/stl/inc/__msvc_int128.hpp @@ -43,14 +43,17 @@ _STD_BEGIN #if defined(_M_X64) && !defined(_M_ARM64EC) && !defined(_M_CEE_PURE) && !defined(__CUDACC__) \ && !defined(__INTEL_COMPILER) #define _STL_128_INTRINSICS 1 -#ifdef __clang__ // clang doesn't have _udiv128 / _div128 -#define _STL_128_DIV_INTRINSICS 0 -#else // ^^^ Clang / other vvv -#define _STL_128_DIV_INTRINSICS 1 -#endif // ^^^ detect _udiv128 / _div128 ^^^ +#ifdef __clang__ +#define _STL_128_ADD_SUB_INTRINSICS 0 // clang doesn't have _addcarry_u64 / _subborrow_u64 +#define _STL_128_DIV_INTRINSICS 0 // clang doesn't have _udiv128 / _div128 +#else // ^^^ Clang / other compilers vvv +#define _STL_128_ADD_SUB_INTRINSICS 1 +#define _STL_128_DIV_INTRINSICS 1 +#endif // ^^^ other compilers ^^^ #else // ^^^ intrinsics available / intrinsics unavailable vvv -#define _STL_128_INTRINSICS 0 -#define _STL_128_DIV_INTRINSICS 0 +#define _STL_128_INTRINSICS 0 +#define _STL_128_ADD_SUB_INTRINSICS 0 +#define _STL_128_DIV_INTRINSICS 0 #endif // ^^^ intrinsics unavailable ^^^ struct @@ -111,11 +114,11 @@ struct static constexpr unsigned char _AddCarry64( unsigned char _Carry, uint64_t _Left, uint64_t _Right, uint64_t& _Result) noexcept { // _STL_INTERNAL_CHECK(_Carry < 2); -#if _STL_128_INTRINSICS +#if _STL_128_ADD_SUB_INTRINSICS if (!_Is_constant_evaluated()) { return _addcarry_u64(_Carry, _Left, _Right, &_Result); } -#endif // _STL_128_INTRINSICS +#endif // _STL_128_ADD_SUB_INTRINSICS const uint64_t _Sum = _Left + _Right + _Carry; _Result = _Sum; @@ -125,11 +128,11 @@ struct static constexpr unsigned char _SubBorrow64( unsigned char _Carry, uint64_t _Left, uint64_t _Right, uint64_t& _Result) noexcept { // _STL_INTERNAL_CHECK(_Carry < 2); -#if _STL_128_INTRINSICS +#if _STL_128_ADD_SUB_INTRINSICS if (!_Is_constant_evaluated()) { return _subborrow_u64(_Carry, _Left, _Right, &_Result); } -#endif // _STL_128_INTRINSICS +#endif // _STL_128_ADD_SUB_INTRINSICS const auto _Difference = _Left - _Right - _Carry; _Result = _Difference; From fd1c890c124364997ee2ba670fec90c707c6c3a3 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 16 May 2023 19:22:44 -0700 Subject: [PATCH 20/36] `LDBL_DECIMAL_DIG` is now missing for Clang too. --- tests/libcxx/expected_results.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index 6a26b567718..2beb0fa244c 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -510,8 +510,8 @@ std/thread/thread.threads/thread.thread.class/thread.thread.assign/move2.pass.cp std/thread/thread.threads/thread.thread.class/thread.thread.member/join.pass.cpp SKIPPED # OS-29877133 "LDBL_DECIMAL_DIG missing from " -std/depr/depr.c.headers/float_h.pass.cpp:0 FAIL -std/language.support/support.limits/c.limits/cfloat.pass.cpp:0 FAIL +std/depr/depr.c.headers/float_h.pass.cpp FAIL +std/language.support/support.limits/c.limits/cfloat.pass.cpp FAIL # *** LIKELY BOGUS TESTS *** From 911f2d176d6939de9c6e8e9eca83d4f173673668 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 16 May 2023 19:26:08 -0700 Subject: [PATCH 21/36] Although LLVM-46207 is still open, Clang now likes tgmath.h. --- tests/libcxx/expected_results.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index 2beb0fa244c..49d913027ca 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -410,8 +410,7 @@ std/utilities/function.objects/func.wrap/func.wrap.func/noncopyable_return_type. # *** CLANG COMPILER BUGS *** -# LLVM-46207 Clang's tgmath.h interferes with the UCRT's tgmath.h -std/depr/depr.c.headers/tgmath_h.pass.cpp:1 FAIL +# Nothing here! :-) # *** CLANG ISSUES, NOT YET ANALYZED *** From 8f97457df78877941ec4dffd22084687d858e345 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 16 May 2023 19:41:39 -0700 Subject: [PATCH 22/36] Cite LLVM-62096 "Clang complains about concept depending on itself". --- tests/std/tests/P2278R4_views_as_const/test.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/std/tests/P2278R4_views_as_const/test.cpp b/tests/std/tests/P2278R4_views_as_const/test.cpp index d44b0890b0c..c33e2e1b17f 100644 --- a/tests/std/tests/P2278R4_views_as_const/test.cpp +++ b/tests/std/tests/P2278R4_views_as_const/test.cpp @@ -545,14 +545,14 @@ using move_only_view = test::range; int main() { -#ifndef __clang__ // TRANSITION, LLVM-44833 +#ifndef __clang__ // TRANSITION, LLVM-62096 { // Validate views // ... copyable constexpr span s{some_ints}; STATIC_ASSERT(test_one(s, some_ints)); test_one(s, some_ints); } -#endif // TRANSITION, LLVM-44833 +#endif // TRANSITION, LLVM-62096 { // ... move-only test_one(move_only_view{some_ints}, some_ints); @@ -611,13 +611,13 @@ int main() { test_one(as_const(views::empty), empty_arr); } -#ifndef __clang__ // TRANSITION, LLVM-44833 +#ifndef __clang__ // TRANSITION, LLVM-62096 { // empty range using Span = span; STATIC_ASSERT(test_one(Span{}, Span{})); test_one(Span{}, Span{}); } -#endif // TRANSITION, LLVM-44833 +#endif // TRANSITION, LLVM-62096 STATIC_ASSERT(instantiation_test()); instantiation_test(); From 8389b2beb4fb24f1c1ddb51aa409c24164d177f0 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Wed, 17 May 2023 07:27:43 -0700 Subject: [PATCH 23/36] Add workaround for LLVM-62762 "32-bit-only misoptimization of printf calls on Windows". --- tests/std/tests/P0067R5_charconv/test.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/std/tests/P0067R5_charconv/test.cpp b/tests/std/tests/P0067R5_charconv/test.cpp index c06b8444798..b898d1902d4 100644 --- a/tests/std/tests/P0067R5_charconv/test.cpp +++ b/tests/std/tests/P0067R5_charconv/test.cpp @@ -1170,6 +1170,9 @@ template pair std::__to_chars( wchar_t* const, wchar_t* const, const __floating_decimal_64, chars_format, const double); template pair std::__d2fixed_buffered_n(wchar_t*, wchar_t* const, const double, const uint32_t); +#if defined(__clang__) && defined(_M_IX86) // TRANSITION, LLVM-62762, fixed in Clang 16.0.3 +int main() {} +#else // ^^^ workaround / no workaround vvv int main(int argc, char** argv) { const auto start = chrono::steady_clock::now(); @@ -1198,3 +1201,4 @@ int main(int argc, char** argv) { puts("That was slow. Consider tuning PrefixesToTest and FractionBits to test fewer cases."); } } +#endif // ^^^ no workaround ^^^ From 3fb9f21dba707c0052933a6bebaefceba63491fc Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 16 May 2023 20:28:41 -0700 Subject: [PATCH 24/36] 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. --- stl/inc/__msvc_int128.hpp | 4 +- stl/inc/__msvc_iter_core.hpp | 22 +- .../__msvc_sanitizer_annotate_container.hpp | 12 +- stl/inc/atomic | 14 +- stl/inc/chrono | 8 +- stl/inc/compare | 32 +-- stl/inc/complex | 2 +- stl/inc/execution | 16 +- stl/inc/expected | 6 +- stl/inc/format | 11 +- stl/inc/iterator | 6 +- stl/inc/memory | 4 +- stl/inc/memory_resource | 4 +- stl/inc/optional | 24 +-- stl/inc/ranges | 81 ++++---- stl/inc/stop_token | 4 +- stl/inc/tuple | 42 ++-- stl/inc/type_traits | 11 +- stl/inc/utility | 10 +- stl/inc/vector | 18 +- stl/inc/xmemory | 6 +- stl/inc/xstring | 2 +- stl/inc/xutility | 193 +++++++++--------- stl/src/taskscheduler.cpp | 4 +- stl/src/vector_algorithms.cpp | 6 +- tests/std/include/range_algorithm_support.hpp | 24 +-- .../test.cpp | 2 +- .../test.compile.pass.cpp | 6 +- tests/std/tests/P0019R8_atomic_ref/test.cpp | 2 +- tests/std/tests/P0088R3_variant/test.cpp | 2 +- .../test.cpp | 14 +- tests/std/tests/P0881R7_stacktrace/test.cpp | 9 +- .../tests/P0896R4_common_iterator/test.cpp | 8 +- .../test.compile.pass.cpp | 8 +- .../test.compile.pass.cpp | 6 +- tests/std/tests/P0898R3_concepts/test.cpp | 2 +- .../tests/P1206R7_ranges_to_mappish/test.cpp | 3 +- .../tests/P1206R7_ranges_to_settish/test.cpp | 3 +- .../test.compile.pass.cpp | 4 +- .../P2278R4_basic_const_iterator/test.cpp | 6 +- .../test.compile.pass.cpp | 20 +- tests/std/tests/P2321R2_views_zip/test.cpp | 6 +- .../P2321R2_views_zip_transform/test.cpp | 9 +- .../P2374R4_views_cartesian_product/test.cpp | 12 +- .../test.cpp | 4 +- tests/std/tests/P2474R2_views_repeat/test.cpp | 6 +- .../test.cpp | 18 +- tests/tr1/tests/type_traits5/test.cpp | 2 +- 48 files changed, 351 insertions(+), 367 deletions(-) diff --git a/stl/inc/__msvc_int128.hpp b/stl/inc/__msvc_int128.hpp index 193d594fd54..a537b05f7b0 100644 --- a/stl/inc/__msvc_int128.hpp +++ b/stl/inc/__msvc_int128.hpp @@ -514,7 +514,7 @@ struct return __qhat; #else // ^^^ 128-bit intrinsics / no such intrinsics vvv #if _HAS_CXX20 - auto __d = _STD countl_zero(_Den._Word[1]); + auto __d = _STD countl_zero(_Den._Word[1]); #else // ^^^ _HAS_CXX20 / !_HAS_CXX20 vvv auto __d = _Countl_zero_fallback(_Den._Word[1]); #endif // ^^^ !_HAS_CXX20 ^^^ @@ -649,7 +649,7 @@ struct } #else // ^^^ 128-bit intrinsics / no such intrinsics vvv #if _HAS_CXX20 - auto __d = _STD countl_zero(_Den._Word[1]); + auto __d = _STD countl_zero(_Den._Word[1]); #else // ^^^ _HAS_CXX20 / !_HAS_CXX20 vvv auto __d = _Countl_zero_fallback(_Den._Word[1]); #endif // ^^^ !_HAS_CXX20 ^^^ diff --git a/stl/inc/__msvc_iter_core.hpp b/stl/inc/__msvc_iter_core.hpp index e94bd7183e6..fe41efa81c8 100644 --- a/stl/inc/__msvc_iter_core.hpp +++ b/stl/inc/__msvc_iter_core.hpp @@ -34,8 +34,8 @@ _EXPORT_STD struct contiguous_iterator_tag : random_access_iterator_tag {}; template concept _Dereferenceable = requires(_Ty& __t) { - { *__t } -> _Can_reference; - }; + { *__t } -> _Can_reference; +}; template concept _Has_member_iterator_concept = requires { typename _Ty::iterator_concept; }; @@ -77,8 +77,8 @@ struct incrementable_traits<_Ty> { template concept _Can_difference = requires(const _Ty& __a, const _Ty& __b) { - { __a - __b } -> integral; - }; + { __a - __b } -> integral; +}; template requires (!_Has_member_difference_type<_Ty> && _Can_difference<_Ty>) @@ -291,10 +291,10 @@ struct _Iter_traits_category3 { template concept _Cpp17_bidi_delta = requires(_It __i) { - { --__i } -> same_as<_It&>; - { __i-- } -> convertible_to; - requires same_as>; - }; + { --__i } -> same_as<_It&>; + { __i-- } -> convertible_to; + requires same_as>; +}; template struct _Iter_traits_category2 { @@ -363,9 +363,9 @@ struct iterator_traits<_Ty*> { template inline constexpr bool _Integer_class = requires { - typename _Ty::_Signed_type; - typename _Ty::_Unsigned_type; - }; + typename _Ty::_Signed_type; + typename _Ty::_Unsigned_type; +}; template concept _Integer_like = _Is_nonbool_integral> || _Integer_class<_Ty>; diff --git a/stl/inc/__msvc_sanitizer_annotate_container.hpp b/stl/inc/__msvc_sanitizer_annotate_container.hpp index db8cbd852f7..f967074ea76 100644 --- a/stl/inc/__msvc_sanitizer_annotate_container.hpp +++ b/stl/inc/__msvc_sanitizer_annotate_container.hpp @@ -92,30 +92,30 @@ void __cdecl __sanitizer_annotate_contiguous_container( #ifdef _M_ARM64EC #pragma comment(linker, \ - "/alternatename:#__sanitizer_annotate_contiguous_container=#__sanitizer_annotate_contiguous_container_default") + "/alternatename:#__sanitizer_annotate_contiguous_container=#__sanitizer_annotate_contiguous_container_default") #pragma comment(linker, \ - "/alternatename:__sanitizer_annotate_contiguous_container=__sanitizer_annotate_contiguous_container_default") + "/alternatename:__sanitizer_annotate_contiguous_container=__sanitizer_annotate_contiguous_container_default") #pragma comment(linker, "/alternatename:#_Asan_vector_should_annotate=#_Asan_vector_should_annotate_default") #pragma comment(linker, "/alternatename:_Asan_vector_should_annotate=_Asan_vector_should_annotate_default") #pragma comment(linker, "/alternatename:#_Asan_string_should_annotate=#_Asan_string_should_annotate_default") #pragma comment(linker, "/alternatename:_Asan_string_should_annotate=_Asan_string_should_annotate_default") #elif defined(_M_HYBRID) #pragma comment(linker, \ - "/alternatename:#__sanitizer_annotate_contiguous_container=#__sanitizer_annotate_contiguous_container_default") + "/alternatename:#__sanitizer_annotate_contiguous_container=#__sanitizer_annotate_contiguous_container_default") #pragma comment(linker, \ - "/alternatename:___sanitizer_annotate_contiguous_container=___sanitizer_annotate_contiguous_container_default") + "/alternatename:___sanitizer_annotate_contiguous_container=___sanitizer_annotate_contiguous_container_default") #pragma comment(linker, "/alternatename:#_Asan_vector_should_annotate=#_Asan_vector_should_annotate_default") #pragma comment(linker, "/alternatename:__Asan_vector_should_annotate=__Asan_vector_should_annotate_default") #pragma comment(linker, "/alternatename:#_Asan_string_should_annotate=#_Asan_string_should_annotate_default") #pragma comment(linker, "/alternatename:__Asan_string_should_annotate=__Asan_string_should_annotate_default") #elif defined(_M_IX86) #pragma comment(linker, \ - "/alternatename:___sanitizer_annotate_contiguous_container=___sanitizer_annotate_contiguous_container_default") + "/alternatename:___sanitizer_annotate_contiguous_container=___sanitizer_annotate_contiguous_container_default") #pragma comment(linker, "/alternatename:__Asan_vector_should_annotate=__Asan_vector_should_annotate_default") #pragma comment(linker, "/alternatename:__Asan_string_should_annotate=__Asan_string_should_annotate_default") #elif defined(_M_X64) || defined(_M_ARM) || defined(_M_ARM64) #pragma comment(linker, \ - "/alternatename:__sanitizer_annotate_contiguous_container=__sanitizer_annotate_contiguous_container_default") + "/alternatename:__sanitizer_annotate_contiguous_container=__sanitizer_annotate_contiguous_container_default") #pragma comment(linker, "/alternatename:_Asan_vector_should_annotate=_Asan_vector_should_annotate_default") #pragma comment(linker, "/alternatename:_Asan_string_should_annotate=_Asan_string_should_annotate_default") #else // ^^^ known architecture / unknown architecture vvv diff --git a/stl/inc/atomic b/stl/inc/atomic index e4043659949..9f9c0aec278 100644 --- a/stl/inc/atomic +++ b/stl/inc/atomic @@ -435,23 +435,23 @@ struct _Atomic_padded { #else // ^^^ don't break ABI / break ABI vvv template struct _Atomic_storage_traits { // properties for how _Ty is stored in an atomic - static constexpr size_t _Storage_size = sizeof(_Ty) == 1 ? 1 - : sizeof(_Ty) == 2 ? 2 - : sizeof(_Ty) <= 4 ? 4 - : sizeof(_Ty) <= 8 ? 8 + static constexpr size_t _Storage_size = sizeof(_Ty) == 1 ? 1 + : sizeof(_Ty) == 2 ? 2 + : sizeof(_Ty) <= 4 ? 4 + : sizeof(_Ty) <= 8 ? 8 #if defined(_M_X64) || defined(_M_ARM64) || defined(_M_ARM64EC) : sizeof(_Ty) <= 16 ? 16 #endif // 64 bits : sizeof(_Ty); static constexpr size_t _Padding_size = _Storage_size - sizeof(_Ty); - static constexpr bool _Uses_padding = _Padding_size != 0; + static constexpr bool _Uses_padding = _Padding_size != 0; }; template struct _Atomic_storage_traits<_Ty&> { // properties for how _Ty is stored in an atomic_ref static constexpr size_t _Storage_size = sizeof(_Ty); - static constexpr bool _Uses_padding = false; + static constexpr bool _Uses_padding = false; }; template ::_Uses_padding> @@ -1117,7 +1117,7 @@ struct _Atomic_storage<_Ty, 8> { // lock-free using 8-byte intrinsics #else // ^^^ _STD_ATOMIC_USE_ARM64_LDAR_STLR == 1 / _STD_ATOMIC_USE_ARM64_LDAR_STLR != 1 vvv #ifdef _M_ARM - _As_bytes = __ldrexd(_Mem); + _As_bytes = __ldrexd(_Mem); #else _As_bytes = __iso_volatile_load64(_Mem); #endif diff --git a/stl/inc/chrono b/stl/inc/chrono index 96e1157fdad..f4a97a93a16 100644 --- a/stl/inc/chrono +++ b/stl/inc/chrono @@ -2538,7 +2538,7 @@ namespace chrono { sys_time _Tp{}; }; - zoned_time()->zoned_time; + zoned_time() -> zoned_time; template zoned_time(sys_time<_Duration>) -> zoned_time>; @@ -2644,7 +2644,7 @@ namespace chrono { #ifdef __cpp_lib_concepts const auto _Leap_cmp = _Utc_leap_second <=> _Time_floor; #else // ^^^ __cpp_lib_concepts / TRANSITION, GH-395 workaround vvv - const auto _Leap_cmp = _Utc_leap_second > _Time_floor ? strong_ordering::greater + const auto _Leap_cmp = _Utc_leap_second > _Time_floor ? strong_ordering::greater : _Utc_leap_second == _Time_floor ? strong_ordering::equal : strong_ordering::less; #endif // ^^^ workaround @@ -4718,8 +4718,8 @@ concept _Chrono_parse_spec_callbacks = _Parse_align_callbacks<_Ty, _CharT> template concept _Has_ok = requires(_Ty _At) { - { _At.ok() } -> same_as; - }; + { _At.ok() } -> same_as; +}; // A chrono spec is either a type (with an optional modifier), OR a literal character, never both. template diff --git a/stl/inc/compare b/stl/inc/compare index c01e004c92e..04b3d5292f7 100644 --- a/stl/inc/compare +++ b/stl/inc/compare @@ -349,9 +349,9 @@ struct _Synth_three_way { template _NODISCARD constexpr auto operator()(const _Ty1& _Left, const _Ty2& _Right) const requires requires { - { _Left < _Right } -> _Boolean_testable; - { _Right < _Left } -> _Boolean_testable; - } + { _Left < _Right } -> _Boolean_testable; + { _Right < _Left } -> _Boolean_testable; + } { if constexpr (three_way_comparable_with<_Ty1, _Ty2>) { return _Left <=> _Right; @@ -381,8 +381,8 @@ namespace _Strong_order { template concept _Has_ADL = requires(_Ty1& _Left, _Ty2& _Right) { - static_cast(strong_order(_Left, _Right)); // intentional ADL - }; + static_cast(strong_order(_Left, _Right)); // intentional ADL + }; template concept _Can_compare_three_way = @@ -477,8 +477,8 @@ namespace _Weak_order { template concept _Has_ADL = requires(_Ty1& _Left, _Ty2& _Right) { - static_cast(weak_order(_Left, _Right)); // intentional ADL - }; + static_cast(weak_order(_Left, _Right)); // intentional ADL + }; template concept _Can_compare_three_way = @@ -603,8 +603,8 @@ namespace _Partial_order { template concept _Has_ADL = requires(_Ty1& _Left, _Ty2& _Right) { - static_cast(partial_order(_Left, _Right)); // intentional ADL - }; + static_cast(partial_order(_Left, _Right)); // intentional ADL + }; template concept _Can_compare_three_way = @@ -681,9 +681,9 @@ inline namespace _Cpos { template concept _Can_fallback_eq_lt = requires(_Ty1& _Left, _Ty2& _Right) { - { _Left == _Right } -> _Boolean_testable; - { _Left < _Right } -> _Boolean_testable; - }; + { _Left == _Right } -> _Boolean_testable; + { _Left < _Right } -> _Boolean_testable; +}; template concept _Can_strong_order = requires(_Ty1& _Left, _Ty2& _Right) { _STD strong_order(_Left, _Right); }; @@ -791,10 +791,10 @@ concept _Can_partial_order = requires(_Ty1& _Left, _Ty2& _Right) { _STD partial_ namespace _Compare_partial_order_fallback { template concept _Can_fallback_eq_lt_twice = requires(_Ty1& _Left, _Ty2& _Right) { - { _Left == _Right } -> _Boolean_testable; - { _Left < _Right } -> _Boolean_testable; - { _Right < _Left } -> _Boolean_testable; - }; + { _Left == _Right } -> _Boolean_testable; + { _Left < _Right } -> _Boolean_testable; + { _Right < _Left } -> _Boolean_testable; + }; class _Cpo { private: diff --git a/stl/inc/complex b/stl/inc/complex index 42b2e32354a..d869f9d5e76 100644 --- a/stl/inc/complex +++ b/stl/inc/complex @@ -2038,7 +2038,7 @@ _NODISCARD complex<_Ty> tanh(const complex<_Ty>& _Left) { _Real = _Ty{1}; } - return complex<_Ty>(_Real, _Tv * _Ty{0}); + return complex<_Ty>(_Real, _Tv* _Ty{0}); } return complex<_Ty>((_Ctraits<_Ty>::sqrt(_Ty{1} + _Sv * _Sv)) * _Bv / _Dv, _Tv / _Dv); diff --git a/stl/inc/execution b/stl/inc/execution index 45ca79f8ec6..a264dc597c6 100644 --- a/stl/inc/execution +++ b/stl/inc/execution @@ -780,8 +780,8 @@ struct _Static_partition_team { // common data for all static partitioned ops _Diff _Unchunked_items; _Static_partition_team(const _Diff _Count_, const size_t _Chunks_) - : _Consumed_chunks{0}, _Chunks{_Chunks_}, _Count{_Count_}, _Chunk_size{static_cast<_Diff>( - _Count_ / static_cast<_Diff>(_Chunks_))}, + : _Consumed_chunks{0}, _Chunks{_Chunks_}, _Count{_Count_}, + _Chunk_size{static_cast<_Diff>(_Count_ / static_cast<_Diff>(_Chunks_))}, _Unchunked_items{static_cast<_Diff>(_Count_ % static_cast<_Diff>(_Chunks_))} { // Calculate common data for statically partitioning iterator ranges. // pre: _Count_ >= _Chunks_ && _Chunks_ >= 1 @@ -1490,8 +1490,8 @@ struct _Static_partitioned_find_end_backward3 { _Static_partitioned_find_end_backward3(const size_t _Hw_threads, const _Iter_diff_t<_BidIt1> _Count, const _BidIt1 _Last1, const _FwdIt2 _First2, const _FwdIt2 _Last2, const _Pr _Pred_) - : _Team{_Count, _Get_chunked_work_chunk_count(_Hw_threads, _Count)}, _Basis{}, - _Results(_Last1), _Range2{_First2, _Last2}, _Pred{_Pred_} {} + : _Team{_Count, _Get_chunked_work_chunk_count(_Hw_threads, _Count)}, _Basis{}, _Results(_Last1), + _Range2{_First2, _Last2}, _Pred{_Pred_} {} _Cancellation_status _Process_chunk() { if (_Results._Complete()) { @@ -1961,8 +1961,8 @@ struct _Static_partitioned_equal2 { _Cancellation_token _Cancel_token; _Static_partitioned_equal2(const size_t _Hw_threads, const _Diff _Count, _Pr _Pred_, const _FwdIt1&, const _FwdIt2&) - : _Team{_Count, _Get_chunked_work_chunk_count(_Hw_threads, _Count)}, _Basis1{}, _Basis2{}, - _Pred(_Pred_), _Cancel_token{} {} + : _Team{_Count, _Get_chunked_work_chunk_count(_Hw_threads, _Count)}, _Basis1{}, _Basis2{}, _Pred(_Pred_), + _Cancel_token{} {} _Cancellation_status _Process_chunk() { if (_Cancel_token._Is_canceled()) { @@ -4119,8 +4119,8 @@ struct _Static_partitioned_transform_reduce_binary2 { // transform-reduction tas _Static_partitioned_transform_reduce_binary2(const _Diff _Count, const size_t _Chunks, const _FwdIt1 _First1, const _FwdIt2 _First2, _BinOp1 _Reduce_op_, _BinOp2 _Transform_op_) - : _Team{_Count, _Chunks}, _Basis1{}, _Basis2{}, _Reduce_op(_Reduce_op_), - _Transform_op(_Transform_op_), _Results{_Chunks} { + : _Team{_Count, _Chunks}, _Basis1{}, _Basis2{}, _Reduce_op(_Reduce_op_), _Transform_op(_Transform_op_), + _Results{_Chunks} { _Basis1._Populate(_Team, _First1); _Basis2._Populate(_Team, _First2); } diff --git a/stl/inc/expected b/stl/inc/expected index 93fbfcf0843..1d216670279 100644 --- a/stl/inc/expected +++ b/stl/inc/expected @@ -165,9 +165,9 @@ struct _Construct_expected_from_invoke_result_tag { template concept _Is_invoke_constructible = requires(_Fn&& _Func, _Tys&&... _Vals) { - static_cast>>( - _STD invoke(_STD forward<_Fn>(_Func), _STD forward<_Tys>(_Vals)...)); - }; + static_cast>>( + _STD invoke(_STD forward<_Fn>(_Func), _STD forward<_Tys>(_Vals)...)); +}; template struct _Check_expected_argument : true_type { diff --git a/stl/inc/format b/stl/inc/format index dd50c3a524f..6c920a3111c 100644 --- a/stl/inc/format +++ b/stl/inc/format @@ -543,10 +543,9 @@ template concept _Format_supported_charT = _Is_any_of_v<_CharT, char, wchar_t>; template -concept _Has_formatter = - requires(_Ty& _Val, _Context& _Ctx) { - _STD declval>>().format(_Val, _Ctx); - }; +concept _Has_formatter = requires(_Ty& _Val, _Context& _Ctx) { + _STD declval>>().format(_Val, _Ctx); +}; template concept _Has_const_formatter = _Has_formatter, _Context>; @@ -2548,8 +2547,8 @@ _NODISCARD _OutputIt _Write_integral( template requires (!_CharT_or_bool<_Integral, _CharT>) -_NODISCARD _OutputIt - _Fmt_write(_OutputIt _Out, _Integral _Value, const _Basic_format_specs<_CharT>& _Specs, _Lazy_locale _Locale); +_NODISCARD _OutputIt _Fmt_write( + _OutputIt _Out, _Integral _Value, const _Basic_format_specs<_CharT>& _Specs, _Lazy_locale _Locale); template _NODISCARD _OutputIt _Fmt_write(_OutputIt _Out, bool _Value, _Basic_format_specs<_CharT> _Specs, _Lazy_locale _Locale); diff --git a/stl/inc/iterator b/stl/inc/iterator index 6884d506bd5..d0c26e3f01d 100644 --- a/stl/inc/iterator +++ b/stl/inc/iterator @@ -1100,9 +1100,9 @@ struct _Common_iterator_pointer_type<_Iter, _Se> { template concept _Has_forward_category = requires { - typename _Iter_cat_t<_Iter>; - requires derived_from<_Iter_cat_t<_Iter>, forward_iterator_tag>; - }; + typename _Iter_cat_t<_Iter>; + requires derived_from<_Iter_cat_t<_Iter>, forward_iterator_tag>; +}; template struct iterator_traits> { diff --git a/stl/inc/memory b/stl/inc/memory index 658f3e78cdc..436ba19b514 100644 --- a/stl/inc/memory +++ b/stl/inc/memory @@ -4175,8 +4175,8 @@ using _Pointer_of_or = typename _Pointer_of_or_helper<_Ty, _Uty>::type; // TRANSITION, requires expression support template concept _Resettable_pointer = requires(_SmartPtr& _Smart_ptr, _Pointer _Ptr, _ArgsT&&... _Args) { - _Smart_ptr.reset(static_cast<_Sp>(_Ptr), _STD forward<_ArgsT>(_Args)...); - }; + _Smart_ptr.reset(static_cast<_Sp>(_Ptr), _STD forward<_ArgsT>(_Args)...); +}; _EXPORT_STD template class out_ptr_t { diff --git a/stl/inc/memory_resource b/stl/inc/memory_resource index dc21f3aa59f..b926bfa2465 100644 --- a/stl/inc/memory_resource +++ b/stl/inc/memory_resource @@ -419,8 +419,8 @@ namespace pmr { _Pool(_Pool&& _That) noexcept : _Unfull_chunk{_STD exchange(_That._Unfull_chunk, nullptr)}, _All_chunks{_STD move(_That._All_chunks)}, _Next_capacity{_STD exchange(_That._Next_capacity, _Default_next_capacity)}, - _Block_size{_That._Block_size}, _Log_of_size{_That._Log_of_size}, _Empty_chunk{_STD exchange( - _That._Empty_chunk, nullptr)} {} + _Block_size{_That._Block_size}, _Log_of_size{_That._Log_of_size}, + _Empty_chunk{_STD exchange(_That._Empty_chunk, nullptr)} {} _Pool& operator=(_Pool&& _That) noexcept { _Unfull_chunk = _STD exchange(_That._Unfull_chunk, nullptr); diff --git a/stl/inc/optional b/stl/inc/optional index 67678631108..d0598b1c5ab 100644 --- a/stl/inc/optional +++ b/stl/inc/optional @@ -626,8 +626,8 @@ _NODISCARD constexpr bool operator==(const optional<_Ty1>& _Left, const optional noexcept(_Fake_copy_init(*_Left == *_Right))) /* strengthened */ #ifdef __cpp_lib_concepts requires requires { - { *_Left == *_Right } -> _Implicitly_convertible_to; - } + { *_Left == *_Right } -> _Implicitly_convertible_to; + } #endif // __cpp_lib_concepts { const bool _Left_has_value = _Left.has_value(); @@ -643,8 +643,8 @@ _NODISCARD constexpr bool operator!=(const optional<_Ty1>& _Left, const optional noexcept(_Fake_copy_init(*_Left != *_Right))) /* strengthened */ #ifdef __cpp_lib_concepts requires requires { - { *_Left != *_Right } -> _Implicitly_convertible_to; - } + { *_Left != *_Right } -> _Implicitly_convertible_to; + } #endif // __cpp_lib_concepts { const bool _Left_has_value = _Left.has_value(); @@ -660,8 +660,8 @@ _NODISCARD constexpr bool operator<(const optional<_Ty1>& _Left, const optional< noexcept(_Fake_copy_init(*_Left < *_Right))) /* strengthened */ #ifdef __cpp_lib_concepts requires requires { - { *_Left < *_Right } -> _Implicitly_convertible_to; - } + { *_Left < *_Right } -> _Implicitly_convertible_to; + } #endif // __cpp_lib_concepts { const bool _Left_has_value = _Left.has_value(); @@ -677,8 +677,8 @@ _NODISCARD constexpr bool operator>(const optional<_Ty1>& _Left, const optional< noexcept(_Fake_copy_init(*_Left > *_Right))) /* strengthened */ #ifdef __cpp_lib_concepts requires requires { - { *_Left > *_Right } -> _Implicitly_convertible_to; - } + { *_Left > *_Right } -> _Implicitly_convertible_to; + } #endif // __cpp_lib_concepts { const bool _Left_has_value = _Left.has_value(); @@ -694,8 +694,8 @@ _NODISCARD constexpr bool operator<=(const optional<_Ty1>& _Left, const optional noexcept(_Fake_copy_init(*_Left <= *_Right))) /* strengthened */ #ifdef __cpp_lib_concepts requires requires(const _Ty1& _Elem1, const _Ty2& _Elem2) { - { *_Left <= *_Right } -> _Implicitly_convertible_to; - } + { *_Left <= *_Right } -> _Implicitly_convertible_to; + } #endif // __cpp_lib_concepts { const bool _Left_has_value = _Left.has_value(); @@ -711,8 +711,8 @@ _NODISCARD constexpr bool operator>=(const optional<_Ty1>& _Left, const optional noexcept(_Fake_copy_init(*_Left >= *_Right))) /* strengthened */ #ifdef __cpp_lib_concepts requires requires { - { *_Left >= *_Right } -> _Implicitly_convertible_to; - } + { *_Left >= *_Right } -> _Implicitly_convertible_to; + } #endif // __cpp_lib_concepts { const bool _Left_has_value = _Left.has_value(); diff --git a/stl/inc/ranges b/stl/inc/ranges index bc55e10643a..98600c5a9cd 100644 --- a/stl/inc/ranges +++ b/stl/inc/ranges @@ -1418,8 +1418,8 @@ namespace ranges { #if _HAS_CXX23 template - concept _Integer_like_with_usable_difference_type = _Signed_integer_like<_Ty> - || (_Integer_like<_Ty> && weakly_incrementable<_Ty>); + concept _Integer_like_with_usable_difference_type = + _Signed_integer_like<_Ty> || (_Integer_like<_Ty> && weakly_incrementable<_Ty>); template struct _Repeat_view_difference_type { @@ -1741,12 +1741,11 @@ namespace ranges { concept _Istreamable_impl = derived_from<_Stream, basic_istream<_CharT, _Traits>> && constructible_from, _Stream&>; template - concept _Istreamable = - requires { - typename _Stream::char_type; - typename _Stream::traits_type; - requires _Istreamable_impl<_Elem, _Stream, typename _Stream::char_type, typename _Stream::traits_type>; - }; + concept _Istreamable = requires { + typename _Stream::char_type; + typename _Stream::traits_type; + requires _Istreamable_impl<_Elem, _Stream, typename _Stream::char_type, typename _Stream::traits_type>; + }; template struct _Istream_fn { @@ -6951,10 +6950,10 @@ namespace ranges { concept _Slide_caches_nothing = random_access_range<_Vw> && sized_range<_Vw>; template - concept _Slide_caches_last = (!_Slide_caches_nothing<_Vw>) && bidirectional_range<_Vw> && common_range<_Vw>; + concept _Slide_caches_last = (!_Slide_caches_nothing<_Vw>) &&bidirectional_range<_Vw> && common_range<_Vw>; template - concept _Slide_caches_first = (!_Slide_caches_nothing<_Vw>) && (!_Slide_caches_last<_Vw>); + concept _Slide_caches_first = (!_Slide_caches_nothing<_Vw>) &&(!_Slide_caches_last<_Vw>); _EXPORT_STD template requires view<_Vw> @@ -7981,9 +7980,9 @@ namespace ranges { constexpr bool _Is_noexcept = (noexcept(static_cast<_ResultType>( _STD declval() - _STD declval())) && ...); // clang-format on - const auto _Get_smallest_distance_closure = - [&_Lhs_tuple, &_Rhs_tuple ]( - index_sequence<_FirstIdx, _Idxs...>) noexcept(_Is_noexcept) { + const auto _Get_smallest_distance_closure = [&_Lhs_tuple, + &_Rhs_tuple]( + index_sequence<_FirstIdx, _Idxs...>) noexcept(_Is_noexcept) { const _ResultType _First_size = static_cast<_ResultType>(_STD get<0>(_Lhs_tuple) - _STD get<0>(_Rhs_tuple)); if (_First_size == 0) { @@ -8006,29 +8005,29 @@ namespace ranges { noexcept((noexcept(_STD declval() == _STD declval()) && ...)) { // clang-format on const auto _Evaluate_equality_closure = - [&_Lhs_tuple, &_Rhs_tuple ](index_sequence<_Indices...>) noexcept( + [&_Lhs_tuple, &_Rhs_tuple](index_sequence<_Indices...>) noexcept( (noexcept(_STD declval() == _STD declval()) && ...)) { - return ((_STD get<_Indices>(_Lhs_tuple) == _STD get<_Indices>(_Rhs_tuple)) || ...); - }; + return ((_STD get<_Indices>(_Lhs_tuple) == _STD get<_Indices>(_Rhs_tuple)) || ...); + }; return _Evaluate_equality_closure(index_sequence_for<_LHSTupleTypes...>{}); } #ifdef __clang__ template // TRANSITION, LLVM-47414 - concept _Zip_iter_converts = _IsConst - && (convertible_to, iterator_t> && ...); + concept _Zip_iter_converts = + _IsConst && (convertible_to, iterator_t> && ...); template // TRANSITION, LLVM-47414 - concept _Zip_sent_converts = _IsConst - && (convertible_to, sentinel_t> && ...); + concept _Zip_sent_converts = + _IsConst && (convertible_to, sentinel_t> && ...); #endif // ^^^ workaround ^^^ template - concept _Zip_transform_constraints = move_constructible<_Func> && is_object_v<_Func> && (sizeof...(_Views) > 0) - && (input_range<_Views> && ...) && (view<_Views> && ...) - && regular_invocable<_Func&, range_reference_t<_Views>...> - && _Can_reference...>>; + concept _Zip_transform_constraints = + move_constructible<_Func> && is_object_v<_Func> && (sizeof...(_Views) > 0) && (input_range<_Views> && ...) + && (view<_Views> && ...) && regular_invocable<_Func&, range_reference_t<_Views>...> + && _Can_reference...>>; _EXPORT_STD template requires (view<_ViewTypes> && ...) && (sizeof...(_ViewTypes) > 0) @@ -8249,11 +8248,12 @@ namespace ranges { { // clang-format on const auto _Swap_every_pair_closure = - [&_Lhs, &_Rhs ](index_sequence<_Indices...>) noexcept(noexcept( + [&_Lhs, &_Rhs](index_sequence<_Indices...>) noexcept(noexcept( ((_RANGES iter_swap(_STD get<_Indices>(_Lhs._Current), _STD get<_Indices>(_Rhs._Current))), ...))) { - ((_RANGES iter_swap(_STD get<_Indices>(_Lhs._Current), _STD get<_Indices>(_Rhs._Current))), ...); - }; + ((_RANGES iter_swap(_STD get<_Indices>(_Lhs._Current), _STD get<_Indices>(_Rhs._Current))), + ...); + }; _Swap_every_pair_closure(index_sequence_for<_ViewTypes...>{}); } @@ -9558,9 +9558,9 @@ namespace ranges { noexcept(noexcept(adjacent_transform_view, decay_t<_Fn>, _Nx>( _STD forward<_Rng>(_Range), _STD forward<_Fn>(_Func)))) requires requires { - adjacent_transform_view, decay_t<_Fn>, _Nx>( - _STD forward<_Rng>(_Range), _STD forward<_Fn>(_Func)); - } + adjacent_transform_view, decay_t<_Fn>, _Nx>( + _STD forward<_Rng>(_Range), _STD forward<_Fn>(_Func)); + } { return adjacent_transform_view, decay_t<_Fn>, _Nx>( _STD forward<_Rng>(_Range), _STD forward<_Fn>(_Func)); @@ -9641,9 +9641,9 @@ namespace ranges { } template - concept _Cartesian_product_is_random_access = (random_access_range<_Maybe_const<_Const, _First>> && ... - && (random_access_range<_Maybe_const<_Const, _Rest>> - && sized_range<_Maybe_const<_Const, _Rest>>) ); + concept _Cartesian_product_is_random_access = + (random_access_range<_Maybe_const<_Const, _First>> && ... + && (random_access_range<_Maybe_const<_Const, _Rest>> && sized_range<_Maybe_const<_Const, _Rest>>) ); template concept _Cartesian_product_common_arg = common_range<_Rng> || (sized_range<_Rng> && random_access_range<_Rng>); @@ -10039,8 +10039,7 @@ namespace ranges { return [&](index_sequence<_Indices...>) { return (_RANGES iter_swap(_STD get<_Indices>(_Left._Current), _STD get<_Indices>(_Right._Current)), ...); - } - (make_index_sequence<1 + sizeof...(_Rest)>{}); + }(make_index_sequence<1 + sizeof...(_Rest)>{}); } }; @@ -10088,8 +10087,7 @@ namespace ranges { { const bool _Is_empty = [&](index_sequence<_Indices...>) { return (_RANGES empty(_STD get<_Indices + 1>(_Bases)) || ...); - } - (make_index_sequence{}); + }(make_index_sequence{}); const auto _Make_iter_tuple = [&](index_sequence<_Indices...>) { return tuple, iterator_t<_Rest>...>{_Begin_or_first_end<_Indices>(_Is_empty)...}; @@ -10102,8 +10100,7 @@ namespace ranges { { const bool _Is_empty = [&](index_sequence<_Indices...>) { return (_RANGES empty(_STD get<_Indices + 1>(_Bases)) || ...); - } - (make_index_sequence{}); + }(make_index_sequence{}); const auto _Make_iter_tuple = [&](index_sequence<_Indices...>) { return tuple, iterator_t...>{ @@ -10132,8 +10129,7 @@ namespace ranges { #else // ^^^ _CONTAINER_DEBUG_LEVEL > 0 / _CONTAINER_DEBUG_LEVEL == 0 vvv return (static_cast<_Size_type>(_RANGES size(_STD get<_Indices>(_Bases))) * ...); #endif // ^^^ _CONTAINER_DEBUG_LEVEL == 0 ^^^ - } - (make_index_sequence<1 + sizeof...(_Rest)>{}); + }(make_index_sequence<1 + sizeof...(_Rest)>{}); } _NODISCARD constexpr auto size() const @@ -10152,8 +10148,7 @@ namespace ranges { #else // ^^^ _CONTAINER_DEBUG_LEVEL > 0 / _CONTAINER_DEBUG_LEVEL == 0 vvv return (static_cast<_Size_type>(_RANGES size(_STD get<_Indices>(_Bases))) * ...); #endif // ^^^ _CONTAINER_DEBUG_LEVEL == 0 ^^^ - } - (make_index_sequence<1 + sizeof...(_Rest)>{}); + }(make_index_sequence<1 + sizeof...(_Rest)>{}); } }; diff --git a/stl/inc/stop_token b/stl/inc/stop_token index ee14cc886a9..3d65a48ddc6 100644 --- a/stl/inc/stop_token +++ b/stl/inc/stop_token @@ -255,7 +255,7 @@ void _Stop_callback_base::_Do_attach( // fast path check if the state is already known auto _Local_sources = _State->_Stop_sources.load(); - if ((_Local_sources & uint32_t{1}) != 0) { + if ((_Local_sources& uint32_t{1}) != 0) { // stop already requested _Fn(this); return; @@ -269,7 +269,7 @@ void _Stop_callback_base::_Do_attach( auto _Head = _State->_Callbacks._Lock_and_load(); // recheck the state in case it changed while we were waiting to acquire the lock _Local_sources = _State->_Stop_sources.load(); - if ((_Local_sources & uint32_t{1}) != 0) { + if ((_Local_sources& uint32_t{1}) != 0) { // stop already requested _State->_Callbacks._Store_and_unlock(_Head); _Fn(this); diff --git a/stl/inc/tuple b/stl/inc/tuple index ff184b9f606..66f0098ef89 100644 --- a/stl/inc/tuple +++ b/stl/inc/tuple @@ -189,13 +189,14 @@ inline constexpr bool _Can_construct_values_from_tuple_like_v, #ifdef __clang__ // TRANSITION, LLVM-59827 template -concept _Can_construct_from_tuple_like = _Different_from<_TupleLike, _Tuple> && _Tuple_like<_TupleLike> - && (!_Is_subrange_v>) - && (tuple_size_v<_Tuple> == tuple_size_v>) - && _Can_construct_values_from_tuple_like_v<_Tuple, _TupleLike> - && (tuple_size_v<_Tuple> != 1 - || (!is_convertible_v<_TupleLike, tuple_element_t<0, _Tuple>> - && !is_constructible_v, _TupleLike>) ); +concept _Can_construct_from_tuple_like = + _Different_from<_TupleLike, _Tuple> && _Tuple_like<_TupleLike> + && (!_Is_subrange_v>) &&( + tuple_size_v<_Tuple> + == tuple_size_v>) &&_Can_construct_values_from_tuple_like_v<_Tuple, _TupleLike> + && (tuple_size_v<_Tuple> != 1 + || (!is_convertible_v<_TupleLike, tuple_element_t<0, _Tuple>> + && !is_constructible_v, _TupleLike>) ); #endif // __clang__ template >> @@ -216,7 +217,7 @@ using _Three_way_comparison_result_with_tuple_like_t = typename _Three_way_comparison_result_with_tuple_like<_TTuple, _UTuple>::type; template -concept _Tuple_like_non_tuple = (!_Is_specialization_v<_Ty, tuple>) && _Tuple_like<_Ty>; +concept _Tuple_like_non_tuple = (!_Is_specialization_v<_Ty, tuple>) &&_Tuple_like<_Ty>; #endif // _HAS_CXX23 && defined(__cpp_lib_concepts) template <> @@ -780,8 +781,8 @@ public: template static constexpr bool _Can_equal_compare_with_tuple_like_v<_Other, index_sequence<_Indices...>> = (requires(const tuple& _Left, const _Other& _Right) { - { _STD get<_Indices>(_Left) == _STD get<_Indices>(_Right) } -> _Boolean_testable; - } && ...); + { _STD get<_Indices>(_Left) == _STD get<_Indices>(_Right) } -> _Boolean_testable; + } && ...); template _NODISCARD constexpr bool _Equals_to_tuple_like(const _Other& _Right, index_sequence<_Indices...>) const { @@ -1125,9 +1126,9 @@ struct _Tuple_like_common_reference; template class _TQual, template class _UQual, size_t... _Indices> requires requires { - typename tuple>, - _UQual>>...>; - } + typename tuple>, + _UQual>>...>; + } struct _Tuple_like_common_reference<_TTuple, _UTuple, _TQual, _UQual, index_sequence<_Indices...>> { using type = tuple< common_reference_t<_TQual>, _UQual>>...>; @@ -1136,8 +1137,9 @@ struct _Tuple_like_common_reference<_TTuple, _UTuple, _TQual, _UQual, index_sequ template <_Tuple_like _TTuple, _Tuple_like _UTuple, template class _TQual, template class _UQual> requires (_Is_specialization_v<_TTuple, tuple> || _Is_specialization_v<_UTuple, tuple>) && is_same_v<_TTuple, decay_t<_TTuple>> && is_same_v<_UTuple, decay_t<_UTuple>> - && (tuple_size_v<_TTuple> == tuple_size_v<_UTuple>) - && requires { typename _Tuple_like_common_reference<_TTuple, _UTuple, _TQual, _UQual>::type; } + && (tuple_size_v<_TTuple> == tuple_size_v<_UTuple>) && requires { + typename _Tuple_like_common_reference<_TTuple, _UTuple, _TQual, _UQual>::type; + } struct basic_common_reference<_TTuple, _UTuple, _TQual, _UQual> { using type = typename _Tuple_like_common_reference<_TTuple, _UTuple, _TQual, _UQual>::type; }; @@ -1147,9 +1149,8 @@ struct _Tuple_like_common_type; template requires requires { - typename tuple< - common_type_t, tuple_element_t<_Indices, _UTuple>>...>; - } + typename tuple, tuple_element_t<_Indices, _UTuple>>...>; + } struct _Tuple_like_common_type<_TTuple, _UTuple, index_sequence<_Indices...>> { using type = tuple, tuple_element_t<_Indices, _UTuple>>...>; }; @@ -1157,8 +1158,9 @@ struct _Tuple_like_common_type<_TTuple, _UTuple, index_sequence<_Indices...>> { template <_Tuple_like _TTuple, _Tuple_like _UTuple> requires (_Is_specialization_v<_TTuple, tuple> || _Is_specialization_v<_UTuple, tuple>) && is_same_v<_TTuple, decay_t<_TTuple>> && is_same_v<_UTuple, decay_t<_UTuple>> - && (tuple_size_v<_TTuple> == tuple_size_v<_UTuple>) - && requires { typename _Tuple_like_common_type<_TTuple, _UTuple>::type; } + && (tuple_size_v<_TTuple> == tuple_size_v<_UTuple>) && requires { + typename _Tuple_like_common_type<_TTuple, _UTuple>::type; + } struct common_type<_TTuple, _UTuple> { using type = typename _Tuple_like_common_type<_TTuple, _UTuple>::type; }; diff --git a/stl/inc/type_traits b/stl/inc/type_traits index 14d04769e75..19c0b1c4340 100644 --- a/stl/inc/type_traits +++ b/stl/inc/type_traits @@ -492,11 +492,11 @@ _INLINE_VAR constexpr bool is_compound_v = !is_fundamental_v<_Ty>; CLASS(const noexcept) \ CLASS(volatile noexcept) \ CLASS(const volatile noexcept) \ - CLASS(&noexcept) \ + CLASS(& noexcept) \ CLASS(const& noexcept) \ CLASS(volatile& noexcept) \ CLASS(const volatile& noexcept) \ - CLASS(&&noexcept) \ + CLASS(&& noexcept) \ CLASS(const&& noexcept) \ CLASS(volatile&& noexcept) \ CLASS(const volatile&& noexcept) @@ -2268,10 +2268,9 @@ concept convertible_to = && requires { static_cast<_To>(_STD declval<_From>()); }; template -concept _Ref_wrap_common_reference_exists_with = - _Is_specialization_v<_RefWrap, reference_wrapper> - && requires { typename common_reference_t; } - && convertible_to<_RefWrapQ, common_reference_t>; +concept _Ref_wrap_common_reference_exists_with = _Is_specialization_v<_RefWrap, reference_wrapper> && requires { + typename common_reference_t; +} && convertible_to<_RefWrapQ, common_reference_t>; template class _RefWrapQual, template class _TyQual> requires (_Ref_wrap_common_reference_exists_with<_RefWrap, _Ty, _RefWrapQual<_RefWrap>, _TyQual<_Ty>> diff --git a/stl/inc/utility b/stl/inc/utility index d16740f2c73..48e8834b419 100644 --- a/stl/inc/utility +++ b/stl/inc/utility @@ -212,8 +212,9 @@ concept _Pair_like = _Tuple_like<_Ty> && tuple_size_v> == 2; #ifdef __clang__ // TRANSITION, LLVM-59827 template -concept _Can_construct_from_pair_like = _Pair_like<_PairLike> && (!_Is_subrange_v>) - && is_constructible_v<_Ty1, decltype(_STD get<0>(_STD declval<_PairLike>()))> +concept _Can_construct_from_pair_like = _Pair_like<_PairLike> + && (!_Is_subrange_v>) &&is_constructible_v<_Ty1, + decltype(_STD get<0>(_STD declval<_PairLike>()))> && is_constructible_v<_Ty2, decltype(_STD get<1>(_STD declval<_PairLike>()))>; #endif // __clang__ #endif // _HAS_CXX23 @@ -533,9 +534,8 @@ _NODISCARD constexpr bool operator>=(const pair<_Ty1, _Ty2>& _Left, const pair<_ template class _TQual, template class _UQual> requires requires { - typename pair, _UQual<_Uty1>>, - common_reference_t<_TQual<_Ty2>, _UQual<_Uty2>>>; - } + typename pair, _UQual<_Uty1>>, common_reference_t<_TQual<_Ty2>, _UQual<_Uty2>>>; + } struct basic_common_reference, pair<_Uty1, _Uty2>, _TQual, _UQual> { using type = pair, _UQual<_Uty1>>, common_reference_t<_TQual<_Ty2>, _UQual<_Uty2>>>; }; diff --git a/stl/inc/vector b/stl/inc/vector index 1d8ec8a59d6..9b1c62de88e 100644 --- a/stl/inc/vector +++ b/stl/inc/vector @@ -2316,7 +2316,7 @@ _NODISCARD _CONSTEXPR20 bool operator<(const vector<_Ty, _Alloc>& _Left, const v const auto _Last = _First + (_STD min)(_Left._Myvec.size(), _Right._Myvec.size()); for (; _First != _Last; ++_First, (void) ++_Other) { - using _Comp = _Vbase_compare_three_way; + using _Comp = _Vbase_compare_three_way; const auto _Result = _Comp{}(*_First, *_Other); if (_Result < 0) { @@ -2941,8 +2941,8 @@ public: this->_Mysize = _STD exchange(_Right._Mysize, size_type{0}); #else // ^^^ _ITERATOR_DEBUG_LEVEL == 0 / _ITERATOR_DEBUG_LEVEL != 0 vvv this->_Orphan_all(); - auto& _Al = this->_Getal(); - auto& _Right_al = _Right._Getal(); + auto& _Al = this->_Getal(); + auto& _Right_al = _Right._Getal(); constexpr auto _Pocma_val = _Choose_pocma_v<_Alvbase>; if constexpr (_Pocma_val == _Pocma_values::_Propagate_allocators) { using _Alproxy_type = _Rebind_alloc_t<_Alvbase, _Container_proxy>; @@ -2951,14 +2951,14 @@ public: _Alproxy_type _Oldal(_Al); _Alproxy_type _Right_proxy_al(_Right_al); _Container_proxy_ptr<_Alvbase> _Proxy(_Right_proxy_al, _Leave_proxy_unbound{}); - this->_Myvec = _STD move(_Right._Myvec); + this->_Myvec = _STD move(_Right._Myvec); this->_Mysize = _STD exchange(_Right._Mysize, size_type{0}); _Proxy._Bind(_Oldal, this); this->_Swap_proxy_and_iterators(_Right); return *this; } } else if constexpr (_Pocma_val == _Pocma_values::_No_propagate_allocators) { - this->_Myvec = _STD move(_Right._Myvec); + this->_Myvec = _STD move(_Right._Myvec); this->_Mysize = _Right._Mysize; if (_Right._Myvec.empty()) { // we took _Right's buffer, so zero out size @@ -2971,7 +2971,7 @@ public: return *this; } - this->_Myvec = _STD move(_Right._Myvec); + this->_Myvec = _STD move(_Right._Myvec); this->_Mysize = _STD exchange(_Right._Mysize, size_type{0}); this->_Swap_proxy_and_iterators(_Right); @@ -3024,7 +3024,7 @@ public: this->_Mysize = _Right._Mysize; #else // ^^^ _ITERATOR_DEBUG_LEVEL == 0 / _ITERATOR_DEBUG_LEVEL != 0 vvv this->_Orphan_all(); - auto& _Al = this->_Getal(); + auto& _Al = this->_Getal(); auto& _Right_al = _Right._Getal(); if constexpr (_Choose_pocca_v<_Alvbase>) { if (_Al != _Right_al) { @@ -3033,14 +3033,14 @@ public: _Alproxy_type _Oldal(_Al); _Alproxy_type _Right_proxy_al(_Right_al); _Container_proxy_ptr<_Alvbase> _Proxy(_Right_proxy_al, _Leave_proxy_unbound{}); - this->_Myvec = _Right._Myvec; + this->_Myvec = _Right._Myvec; this->_Mysize = _Right._Mysize; _Proxy._Bind(_Oldal, this); return *this; } } - this->_Myvec = _Right._Myvec; + this->_Myvec = _Right._Myvec; this->_Mysize = _Right._Mysize; #endif // _ITERATOR_DEBUG_LEVEL == 0 diff --git a/stl/inc/xmemory b/stl/inc/xmemory index d527dd705c8..288fff95202 100644 --- a/stl/inc/xmemory +++ b/stl/inc/xmemory @@ -1420,7 +1420,7 @@ using _Container_base = _Container_base0; using _Iterator_base = _Iterator_base0; #else // _ITERATOR_DEBUG_LEVEL == 0 using _Container_base = _Container_base12; -using _Iterator_base = _Iterator_base12; +using _Iterator_base = _Iterator_base12; #endif // _ITERATOR_DEBUG_LEVEL == 0 struct _Leave_proxy_unbound { @@ -1828,7 +1828,7 @@ _CONSTEXPR20 _Alloc_ptr_t<_Alloc> _Uninitialized_copy( // In pre-concepts world, _Uninitialized_copy should only ever be called with an iterator // and sentinel of the same type, so `_Get_unwrapped` is fine to call. auto _UFirst = _Get_unwrapped(_STD move(_First)); - auto _ULast = _Get_unwrapped(_STD move(_Last)); + auto _ULast = _Get_unwrapped(_STD move(_Last)); #endif // ^^^ !__cpp_lib_concepts ^^^ constexpr bool _Can_memmove = _Sent_copy_cat::_Bitcopy_constructible @@ -2499,7 +2499,7 @@ _EXPORT_STD inline constexpr from_range_t from_range; template concept _Container_compatible_range = - (_RANGES input_range<_Rng>) && convertible_to<_RANGES range_reference_t<_Rng>, _Elem>; + (_RANGES input_range<_Rng>) &&convertible_to<_RANGES range_reference_t<_Rng>, _Elem>; template <_RANGES input_range _Rng> using _Range_key_type = remove_const_t::first_type>; diff --git a/stl/inc/xstring b/stl/inc/xstring index aacda3476e5..c6ddacf5d36 100644 --- a/stl/inc/xstring +++ b/stl/inc/xstring @@ -2315,7 +2315,7 @@ struct _String_constructor_rvalue_allocator_tag { #if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, GH-395 template concept _Contiguous_range_of = - (_RANGES contiguous_range<_Rng>) && same_as>, _Ty>; + (_RANGES contiguous_range<_Rng>) &&same_as>, _Ty>; #endif // _HAS_CXX23 && defined(__cpp_lib_concepts) _EXPORT_STD template , class _Alloc = allocator<_Elem>> diff --git a/stl/inc/xutility b/stl/inc/xutility index b08f25d5a82..a31f49194f6 100644 --- a/stl/inc/xutility +++ b/stl/inc/xutility @@ -307,9 +307,9 @@ struct pointer_traits<_Ty*> { #ifdef __cpp_lib_concepts template concept _Has_to_address = requires(const _Ty& _Val) { - typename pointer_traits<_Ty>; - pointer_traits<_Ty>::to_address(_Val); - }; + typename pointer_traits<_Ty>; + pointer_traits<_Ty>::to_address(_Val); +}; #else // ^^^ Use concept / use variable template vvv template inline constexpr bool _Has_to_address = false; // determines whether pointer_traits<_Ty> has to_address @@ -589,10 +589,9 @@ template