From 60ab5aa38188e6f4329cb03975c155a7c3dc5ddb Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 14 Mar 2023 16:39:22 -0700 Subject: [PATCH 01/28] Use PowerShell 7.3.3. --- 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 c0da5f4b8d4..4fa35609329 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.2/PowerShell-7.3.2-win-x64.zip' + $PowerShellZipUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.3.3/PowerShell-7.3.3-win-x64.zip' Write-Host "Downloading: $PowerShellZipUrl" $ExtractedPowerShellPath = DownloadAndExtractZip -Url $PowerShellZipUrl $PwshPath = Join-Path $ExtractedPowerShellPath 'pwsh.exe' From 4560b690111e0df2129cc95a64069d3ce82bce09 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 14 Mar 2023 17:12:14 -0700 Subject: [PATCH 02/28] Drop the Spectre libs. --- azure-devops/provision-image.ps1 | 3 --- 1 file changed, 3 deletions(-) diff --git a/azure-devops/provision-image.ps1 b/azure-devops/provision-image.ps1 index 4fa35609329..57202962a82 100644 --- a/azure-devops/provision-image.ps1 +++ b/azure-devops/provision-image.ps1 @@ -128,9 +128,6 @@ $Workloads = @( 'Microsoft.VisualStudio.Component.VC.CMake.Project', 'Microsoft.VisualStudio.Component.VC.CoreIde', 'Microsoft.VisualStudio.Component.VC.Llvm.Clang', - 'Microsoft.VisualStudio.Component.VC.Runtimes.ARM.Spectre', - 'Microsoft.VisualStudio.Component.VC.Runtimes.ARM64.Spectre', - 'Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre', 'Microsoft.VisualStudio.Component.VC.Tools.ARM', 'Microsoft.VisualStudio.Component.VC.Tools.ARM64', 'Microsoft.VisualStudio.Component.VC.Tools.ARM64EC', From 9a220edb44d1ed8a5269cf82e8a2a10e5e0129e9 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 14 Mar 2023 18:36:11 -0700 Subject: [PATCH 03/28] Drop unused InstallPath and Nickname parameters. --- azure-devops/provision-image.ps1 | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/azure-devops/provision-image.ps1 b/azure-devops/provision-image.ps1 index 57202962a82..a4bcc24e964 100644 --- a/azure-devops/provision-image.ps1 +++ b/azure-devops/provision-image.ps1 @@ -184,19 +184,11 @@ The set of VS workloads to install. .PARAMETER BootstrapperUrl The URL of the Visual Studio installer, i.e. one of vs_*.exe. - -.PARAMETER InstallPath -The path to install Visual Studio at. - -.PARAMETER Nickname -The nickname to give the installation. #> Function InstallVisualStudio { Param( [String[]]$Workloads, - [String]$BootstrapperUrl, - [String]$InstallPath = $null, - [String]$Nickname = $null + [String]$BootstrapperUrl ) try { @@ -210,16 +202,6 @@ Function InstallVisualStudio { $args += $workload } - if (-not ([String]::IsNullOrWhiteSpace($InstallPath))) { - $args += '--installpath' - $args += $InstallPath - } - - if (-not ([String]::IsNullOrWhiteSpace($Nickname))) { - $args += '--nickname' - $args += $Nickname - } - $proc = Start-Process -FilePath cmd.exe -ArgumentList $args -Wait -PassThru PrintMsiExitCodeMessage $proc.ExitCode } From 3fd509aedddfeb0592430d934d86d70c22407ae0 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 14 Mar 2023 18:41:46 -0700 Subject: [PATCH 04/28] Drop unused `$ReleaseInPath` and `$Sku` variables. --- azure-devops/provision-image.ps1 | 2 -- 1 file changed, 2 deletions(-) diff --git a/azure-devops/provision-image.ps1 b/azure-devops/provision-image.ps1 index a4bcc24e964..77021dfa856 100644 --- a/azure-devops/provision-image.ps1 +++ b/azure-devops/provision-image.ps1 @@ -135,8 +135,6 @@ $Workloads = @( 'Microsoft.VisualStudio.Component.Windows11SDK.22000' ) -$ReleaseInPath = 'Preview' -$Sku = 'Enterprise' $VisualStudioBootstrapperUrl = 'https://aka.ms/vs/17/pre/vs_enterprise.exe' $PythonUrl = 'https://www.python.org/ftp/python/3.11.2/python-3.11.2-amd64.exe' From 7f459a48f75d39b434b0f371c70d2567070f0c5c Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 14 Mar 2023 21:33:39 -0700 Subject: [PATCH 05/28] Use Update-AzConfig to silence breaking change warnings. --- azure-devops/create-1es-hosted-pool.ps1 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/azure-devops/create-1es-hosted-pool.ps1 b/azure-devops/create-1es-hosted-pool.ps1 index aad0f0b722e..5fa99fbe174 100644 --- a/azure-devops/create-1es-hosted-pool.ps1 +++ b/azure-devops/create-1es-hosted-pool.ps1 @@ -11,9 +11,6 @@ See https://github.com/microsoft/STL/wiki/Checklist-for-Toolset-Updates for more $ErrorActionPreference = 'Stop' -# https://aka.ms/azps-changewarnings -$Env:SuppressAzurePowerShellBreakingChangeWarnings = 'true' - $CurrentDate = Get-Date $Location = 'eastus' @@ -24,7 +21,7 @@ $ImageOffer = 'WindowsServer' $ImageSku = '2022-datacenter-g2' $ProgressActivity = 'Preparing STL CI pool' -$TotalProgress = 25 +$TotalProgress = 26 $CurrentProgress = 1 <# @@ -120,6 +117,13 @@ function Wait-Shutdown { } } +#################################################################################################### +Display-ProgressBar -Status 'Silencing breaking change warnings' + +# https://aka.ms/azps-changewarnings +Update-AzConfig ` + -DisplayBreakingChangeWarning $false ` + -Scope 'Process' | Out-Null #################################################################################################### Display-ProgressBar -Status 'Setting the subscription context' From d9bb6e632b08d54ec968c247e92a7af3b9693c8b Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Fri, 14 Oct 2022 18:43:24 -0700 Subject: [PATCH 06/28] Enable trusted launch, supported as of 2023-03-20. --- azure-devops/create-1es-hosted-pool.ps1 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/azure-devops/create-1es-hosted-pool.ps1 b/azure-devops/create-1es-hosted-pool.ps1 index 5fa99fbe174..232464f305f 100644 --- a/azure-devops/create-1es-hosted-pool.ps1 +++ b/azure-devops/create-1es-hosted-pool.ps1 @@ -211,6 +211,15 @@ $VM = Set-AzVMBootDiagnostic ` -VM $VM ` -Disable +$VM = Set-AzVMSecurityProfile ` + -VM $VM ` + -SecurityType 'TrustedLaunch' + +$VM = Set-AzVMUefi ` + -VM $VM ` + -EnableVtpm $true ` + -EnableSecureBoot $true + New-AzVm ` -ResourceGroupName $ResourceGroupName ` -Location $Location ` @@ -309,6 +318,7 @@ New-AzGalleryImageDefinition ` -Publisher $ImagePublisher ` -Offer $ImageOffer ` -Sku $ImageSku ` + -Feature @(@{ Name = 'SecurityType'; Value = 'TrustedLaunch'; }) ` -HyperVGeneration 'V2' | Out-Null #################################################################################################### From d483b83a79cc87167816cded99a28ed636f0a1f8 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Mon, 10 Apr 2023 19:58:09 -0700 Subject: [PATCH 07/28] Python 3.11.3. --- 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 77021dfa856..c5731b52fb1 100644 --- a/azure-devops/provision-image.ps1 +++ b/azure-devops/provision-image.ps1 @@ -136,7 +136,7 @@ $Workloads = @( ) $VisualStudioBootstrapperUrl = 'https://aka.ms/vs/17/pre/vs_enterprise.exe' -$PythonUrl = 'https://www.python.org/ftp/python/3.11.2/python-3.11.2-amd64.exe' +$PythonUrl = 'https://www.python.org/ftp/python/3.11.3/python-3.11.3-amd64.exe' $CudaUrl = 'https://developer.download.nvidia.com/compute/cuda/11.6.0/local_installers/cuda_11.6.0_511.23_windows.exe' From 80309377cf7a28edf124e6aeacf481ac99774b42 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Apr 2023 15:08:39 -0700 Subject: [PATCH 08/28] New pool. --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9a0f22ce43c..5baa036c05a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,7 +9,7 @@ variables: benchmarkBuildOutputLocation: 'D:\benchmark' pool: - name: 'StlBuild-2023-02-21T1058-Pool' + name: 'StlBuild-2023-04-11T1428-Pool' demands: EnableSpotVM -equals true pr: From d8c99cbcabb4d9465b7bfe8fad712dcb894de465 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Apr 2023 15:11:07 -0700 Subject: [PATCH 09/28] VS 2022 17.6 Preview 3. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6e48b4eb109..52781d2551f 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 1 or later. +1. Install Visual Studio 2022 17.6 Preview 3 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 1 or later. +1. Install Visual Studio 2022 17.6 Preview 3 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 02e729addfd141afe982f23987b48574382bda36 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Apr 2023 15:12:24 -0700 Subject: [PATCH 10/28] Require CMake 3.26.0. --- CMakeLists.txt | 2 +- README.md | 4 ++-- benchmarks/CMakeLists.txt | 2 +- tools/CMakeLists.txt | 2 +- tools/format/CMakeLists.txt | 2 +- tools/validate/CMakeLists.txt | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 17ebf7456f3..ad971dad468 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -cmake_minimum_required(VERSION 3.25.2) +cmake_minimum_required(VERSION 3.26.0) set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) project(msvc_standard_libraries LANGUAGES CXX) diff --git a/README.md b/README.md index 52781d2551f..af9dd095d39 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,7 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem * 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. - * Otherwise, install [CMake][] 3.25.2 or later, and [Ninja][] 1.11.0 or later. + * Otherwise, install [CMake][] 3.26.0 or later, and [Ninja][] 1.11.0 or later. * We recommend selecting "Python 3 64-bit" in the VS Installer. * Otherwise, make sure [Python][] 3.9 or later is available to CMake. 2. Open Visual Studio, and choose the "Clone or check out code" option. Enter the URL of this repository, @@ -161,7 +161,7 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem * 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. - * Otherwise, install [CMake][] 3.25.2 or later, and [Ninja][] 1.11.0 or later. + * Otherwise, install [CMake][] 3.26.0 or later, and [Ninja][] 1.11.0 or later. * We recommend selecting "Python 3 64-bit" in the VS Installer. * Otherwise, make sure [Python][] 3.9 or later is available to CMake. 2. Open a command prompt. diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt index 594b1db0c3c..cc188710c1c 100644 --- a/benchmarks/CMakeLists.txt +++ b/benchmarks/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -cmake_minimum_required(VERSION 3.25.2) +cmake_minimum_required(VERSION 3.26.0) project(msvc_standard_libraries_benchmarks LANGUAGES CXX) if(DEFINED STL_BINARY_DIR) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 3b12cfd5fd9..a2e00355deb 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -cmake_minimum_required(VERSION 3.25.2) +cmake_minimum_required(VERSION 3.26.0) project(msvc_standard_libraries_tools LANGUAGES CXX) add_subdirectory(format) diff --git a/tools/format/CMakeLists.txt b/tools/format/CMakeLists.txt index 1986474dfa6..4574232ee1b 100644 --- a/tools/format/CMakeLists.txt +++ b/tools/format/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -cmake_minimum_required(VERSION 3.25.2) +cmake_minimum_required(VERSION 3.26.0) project(msvc_standard_libraries_format NONE) set(did_search OFF) diff --git a/tools/validate/CMakeLists.txt b/tools/validate/CMakeLists.txt index 0c14d4f86ec..ff7c92b5ae1 100644 --- a/tools/validate/CMakeLists.txt +++ b/tools/validate/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -cmake_minimum_required(VERSION 3.25.2) +cmake_minimum_required(VERSION 3.26.0) project(msvc_standard_libraries_validate LANGUAGES CXX) add_executable(validate-binary validate.cpp) From 8ae0680860799c5b127819a6297688115fced811 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Apr 2023 15:20:19 -0700 Subject: [PATCH 11/28] Pass my new `/quiet` option to `ml[64]`. --- stl/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stl/CMakeLists.txt b/stl/CMakeLists.txt index b3297579ea0..64ee93e9055 100644 --- a/stl/CMakeLists.txt +++ b/stl/CMakeLists.txt @@ -502,7 +502,7 @@ set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "Embedded") add_compile_options(/WX /Gy "$<$:/diagnostics:caret;/W4;/w14265;/w15038;/fastfail;/guard:cf;/Zp8;/std:c++latest;/permissive-;/Zc:threadSafeInit-;/Zl>" - "$<$:/W3;/nologo>" + "$<$:/W3;/nologo;/quiet>" ) include_directories(BEFORE From 9ef4aa54e1c5a18c88660423de8d04d242762c91 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Apr 2023 15:25:00 -0700 Subject: [PATCH 12/28] Remove workarounds for DevCom-10265322 "Equality comparison with reversed order of `operator==` is sometimes buggy". --- stl/inc/tuple | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/stl/inc/tuple b/stl/inc/tuple index 12efb5fb710..e1aaacbd28d 100644 --- a/stl/inc/tuple +++ b/stl/inc/tuple @@ -289,9 +289,6 @@ public: #if _HAS_CXX23 && defined(__cpp_lib_concepts) template <_Tuple_like _Other> -#ifndef __clang__ // TRANSITION, DevCom-10265322 - requires _Different_from<_Other, tuple> -#endif // __clang__ _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; @@ -299,9 +296,6 @@ public: template <_Tuple_like _Other> requires (tuple_size_v> == 0) -#ifndef __clang__ // TRANSITION, DevCom-10265322 - && _Different_from<_Other, tuple> -#endif // __clang__ _NODISCARD_FRIEND constexpr strong_ordering operator<=>(const tuple&, const _Other&) noexcept /* strengthened */ { return strong_ordering::equal; } @@ -794,9 +788,6 @@ public: } template <_Tuple_like _Other> -#ifndef __clang__ // TRANSITION, DevCom-10265322 - requires _Different_from<_Other, tuple> -#endif // __clang__ _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)."); @@ -817,9 +808,6 @@ public: } template <_Tuple_like _Other> -#ifndef __clang__ // TRANSITION, DevCom-10265322 - requires _Different_from<_Other, tuple> -#endif // __clang__ _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 cb52791ce0bafffa822a74726842d88d347de437 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Apr 2023 15:29:06 -0700 Subject: [PATCH 13/28] Remove workarounds for VSO-1734935 "Copy elision fails in permissive mode". Now we don't need the `is_permissive` detection machinery. --- .../test.cpp | 70 ++++++------------- 1 file changed, 22 insertions(+), 48 deletions(-) diff --git a/tests/std/tests/P2505R5_monadic_functions_for_std_expected/test.cpp b/tests/std/tests/P2505R5_monadic_functions_for_std_expected/test.cpp index 39b6ffcc483..69011d86d3f 100644 --- a/tests/std/tests/P2505R5_monadic_functions_for_std_expected/test.cpp +++ b/tests/std/tests/P2505R5_monadic_functions_for_std_expected/test.cpp @@ -8,28 +8,6 @@ using namespace std; -namespace detail { - static constexpr bool permissive() { - return false; - } - - template - struct DependentBase { - static constexpr bool permissive() { - return true; - } - }; - - template - struct Derived : DependentBase { - static constexpr bool test() { - return permissive(); - } - }; -} // namespace detail - -constexpr bool is_permissive = detail::Derived::test(); - enum class IsNothrowConstructible : bool { Not, Yes }; enum class IsNothrowConvertible : bool { Not, Yes }; @@ -144,18 +122,16 @@ constexpr void test_impl(Expected&& engaged, Expected&& unengaged) { } } - if constexpr (!is_permissive) { // TRANSITION, VSO-1734935 - { - decltype(auto) result = forward(engaged).transform(immov); - static_assert(is_same_v>); - assert(result->v == 88); - } - { - decltype(auto) result = forward(unengaged).transform(immov); - static_assert(is_same_v>); - assert(!result); - assert(result.error() == 22); - } + { + decltype(auto) result = forward(engaged).transform(immov); + static_assert(is_same_v>); + assert(result->v == 88); + } + { + decltype(auto) result = forward(unengaged).transform(immov); + static_assert(is_same_v>); + assert(!result); + assert(result.error() == 22); } { @@ -203,22 +179,20 @@ constexpr void test_impl(Expected&& engaged, Expected&& unengaged) { assert(result.error() == 66); } - if constexpr (!is_permissive) { // TRANSITION, VSO-1734935 - { - decltype(auto) result = forward(engaged).transform_error(immov); - static_assert(is_same_v>); - assert(result); - if constexpr (!is_void_v) { - assert(result->x == 11); - } - } - { - decltype(auto) result = forward(unengaged).transform_error(immov); - static_assert(is_same_v>); - assert(!result); - assert(result.error().v == 88); + { + decltype(auto) result = forward(engaged).transform_error(immov); + static_assert(is_same_v>); + assert(result); + if constexpr (!is_void_v) { + assert(result->x == 11); } } + { + decltype(auto) result = forward(unengaged).transform_error(immov); + static_assert(is_same_v>); + assert(!result); + assert(result.error().v == 88); + } const auto to_expected_thingy = [](auto...) { if constexpr (is_void_v) { From 56ee17015bddf1653b9e3e8d7a390f2fd6afb1aa Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Apr 2023 15:40:14 -0700 Subject: [PATCH 14/28] Remove workaround for DevCom-10247495 "MSVC forces us to export some internal enumeration functions for working with C++ modules". --- stl/inc/xfilesystem_abi.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/stl/inc/xfilesystem_abi.h b/stl/inc/xfilesystem_abi.h index 97434fe4f88..574cb1002cf 100644 --- a/stl/inc/xfilesystem_abi.h +++ b/stl/inc/xfilesystem_abi.h @@ -79,11 +79,7 @@ enum class __std_fs_file_attr : unsigned long { }; _END_EXTERN_C -#if 1 // TRANSITION, DevCom-10247495 -_BITMASK_OPS(_EXPORT_STD, __std_fs_file_attr) -#else // ^^^ workaround / no workaround vvv _BITMASK_OPS(_EMPTY_ARGUMENT, __std_fs_file_attr) -#endif // ^^^ no workaround ^^^ _EXTERN_C enum class __std_fs_reparse_tag : unsigned long { From 2da4ea7d52ab407d77f291586a2d38b2ed225809 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Apr 2023 15:41:35 -0700 Subject: [PATCH 15/28] Remove workaround for VSO-1582358 "Standard Library Modules: chrono formatting emits bogus error C3861: '_Fill_tm': identifier not found". --- stl/inc/chrono | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stl/inc/chrono b/stl/inc/chrono index 202b9aa847b..e0812f58438 100644 --- a/stl/inc/chrono +++ b/stl/inc/chrono @@ -4998,7 +4998,7 @@ namespace chrono { _Write_seconds(_Os, _Hh_mm_ss_part_underflow_to_zero(_Val)); } - _EXPORT_STD /* TRANSITION, VSO-1582358 */ template + template _NODISCARD tm _Fill_tm(const _Ty& _Val) { unsigned int _Day = 0; unsigned int _Month = 0; From 8b2545269530ee807f0b977693c004f7f034e81c Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Apr 2023 15:43:11 -0700 Subject: [PATCH 16/28] Remove workarounds for VSO-1592329 "Standard Library Modules: Parallel sort() emits bogus error C2065: '_Atomic_counter_t': undeclared identifier". --- stl/inc/execution | 2 +- stl/inc/xatomic.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stl/inc/execution b/stl/inc/execution index e0b4df6e338..45ca79f8ec6 100644 --- a/stl/inc/execution +++ b/stl/inc/execution @@ -475,7 +475,7 @@ struct _Parallel_choose_max_chunk { } }; -_EXPORT_STD /* TRANSITION, VSO-1592329 */ template +template struct alignas(_Ty) alignas(size_t) alignas(_Atomic_counter_t) _Circular_buffer { // work stealing deque extent type static_assert(is_trivial_v<_Ty>, "Work stealing deques work only with trivial operations"); diff --git a/stl/inc/xatomic.h b/stl/inc/xatomic.h index 83ca9def6f8..aceaadf8209 100644 --- a/stl/inc/xatomic.h +++ b/stl/inc/xatomic.h @@ -101,7 +101,7 @@ enum memory_order { }; #endif // _HAS_CXX20 -_EXPORT_STD /* TRANSITION, VSO-1592329 */ using _Atomic_counter_t = unsigned long; +using _Atomic_counter_t = unsigned long; template _NODISCARD volatile _Integral* _Atomic_address_as(_Ty& _Source) noexcept { From 7f6329f2852908b6064852664903be910f5a605f Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Apr 2023 15:44:18 -0700 Subject: [PATCH 17/28] Remove workaround for VSO-1705654 "Standard Library Modules: /analyze ICE". --- tests/std/tests/P2465R3_standard_library_modules/env.lst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/std/tests/P2465R3_standard_library_modules/env.lst b/tests/std/tests/P2465R3_standard_library_modules/env.lst index 09e0e46e6df..bce5b396773 100644 --- a/tests/std/tests/P2465R3_standard_library_modules/env.lst +++ b/tests/std/tests/P2465R3_standard_library_modules/env.lst @@ -13,6 +13,5 @@ PM_CL="/MD" PM_CL="/MDd" PM_CL="/MT" PM_CL="/MTd" -# TRANSITION, VSO-1705654 -# PM_CL="/MDd /analyze:only /analyze:autolog-" +PM_CL="/MDd /analyze:only /analyze:autolog-" PM_CL="/MDd /GR- /D_HAS_STATIC_RTTI=0" From 56fec8457c15fc7108a4c9b748ce360830f8d45c Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Apr 2023 15:48:19 -0700 Subject: [PATCH 18/28] Remove workaround for VSO-1726729 "REPORTED: EDG rejects constexpr vector insert() in debug mode with 'attempt to access run-time storage' errors". --- tests/std/tests/P1004R2_constexpr_vector/test.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/std/tests/P1004R2_constexpr_vector/test.cpp b/tests/std/tests/P1004R2_constexpr_vector/test.cpp index 8bda2b9dcdb..8c02ccab4b3 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-1726729 (attempt to access run-time storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { // modifiers vec range_constructed(begin(input), end(input)); From cfc636e43067b4f13a78d4bc62081d5be7bcd2a1 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Apr 2023 15:50:03 -0700 Subject: [PATCH 19/28] Remove workarounds for VSO-1161663 "REPORTED: [Feedback] EDG constexpr rejects left <= right when null pointers are passed by reference". --- stl/inc/array | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/stl/inc/array b/stl/inc/array index 8eab5545113..545f68c2d17 100644 --- a/stl/inc/array +++ b/stl/inc/array @@ -769,11 +769,7 @@ _CONSTEXPR20 void swap(array<_Ty, _Size>& _Left, array<_Ty, _Size>& _Right) noex _EXPORT_STD template _NODISCARD _CONSTEXPR20 bool operator==(const array<_Ty, _Size>& _Left, const array<_Ty, _Size>& _Right) { -#ifdef __EDG__ // TRANSITION, VSO-1161663 - return _STD equal(_Left.begin(), _Left.end(), _Right.begin()); -#else // ^^^ workaround / no workaround vvv return _STD equal(_Left._Unchecked_begin(), _Left._Unchecked_end(), _Right._Unchecked_begin()); -#endif // ^^^ no workaround ^^^ } #if !_HAS_CXX20 @@ -787,23 +783,14 @@ _NODISCARD bool operator!=(const array<_Ty, _Size>& _Left, const array<_Ty, _Siz _EXPORT_STD template _NODISCARD constexpr _Synth_three_way_result<_Ty> operator<=>( const array<_Ty, _Size>& _Left, const array<_Ty, _Size>& _Right) { -#ifdef __EDG__ // TRANSITION, VSO-1161663 - return _STD lexicographical_compare_three_way( - _Left.begin(), _Left.end(), _Right.begin(), _Right.end(), _Synth_three_way{}); -#else // ^^^ workaround / no workaround vvv return _STD lexicographical_compare_three_way(_Left._Unchecked_begin(), _Left._Unchecked_end(), _Right._Unchecked_begin(), _Right._Unchecked_end(), _Synth_three_way{}); -#endif // ^^^ no workaround ^^^ } #else // ^^^ defined(__cpp_lib_concepts) / !defined(__cpp_lib_concepts) vvv template _NODISCARD _CONSTEXPR20 bool operator<(const array<_Ty, _Size>& _Left, const array<_Ty, _Size>& _Right) { -#ifdef __EDG__ // TRANSITION, VSO-1161663 - return _STD lexicographical_compare(_Left.begin(), _Left.end(), _Right.begin(), _Right.end()); -#else // ^^^ workaround / no workaround vvv return _STD lexicographical_compare( _Left._Unchecked_begin(), _Left._Unchecked_end(), _Right._Unchecked_begin(), _Right._Unchecked_end()); -#endif // ^^^ no workaround ^^^ } template From 81716b848c6e40e681d8bf8d92fbea6708d504b8 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Apr 2023 16:01:11 -0700 Subject: [PATCH 20/28] Remove numerous workarounds for VSO-1726722 "REPORTED: EDG rejects constexpr string/vector in debug mode with 'attempt to access expired storage' errors, part 2". --- .../tests/P0980R1_constexpr_strings/test.cpp | 60 ------- .../tests/P1004R2_constexpr_vector/test.cpp | 56 ++---- .../P1004R2_constexpr_vector_bool/test.cpp | 161 +++++------------- .../tests/P2321R2_proxy_reference/test.cpp | 16 +- .../test.cpp | 7 - 5 files changed, 56 insertions(+), 244 deletions(-) diff --git a/tests/std/tests/P0980R1_constexpr_strings/test.cpp b/tests/std/tests/P0980R1_constexpr_strings/test.cpp index 8d8cf25b2ee..d6680dc1f4e 100644 --- a/tests/std/tests/P0980R1_constexpr_strings/test.cpp +++ b/tests/std/tests/P0980R1_constexpr_strings/test.cpp @@ -608,9 +608,6 @@ constexpr bool test_interface() { assert(cleared.capacity() == str{get_literal_input()}.capacity()); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { // insert str insert_char = get_literal_input(); const CharType to_be_inserted = CharType{','}; @@ -688,9 +685,6 @@ constexpr bool test_interface() { assert(equalRanges(insert_iter_count_char, "Hellooooo fluffy kittens"sv)); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { // erase str erase_pos_count = get_literal_input(); erase_pos_count.erase(0, 6); @@ -967,9 +961,6 @@ constexpr bool test_interface() { } #endif // _HAS_CXX23 -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { // replace const str input = get_dog(); @@ -1059,9 +1050,6 @@ constexpr bool test_interface() { assert(equalRanges(replaced_pos_count_conversion_pos_count, "dfluffy"sv)); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { // substr const str input = get_literal_input(); @@ -1558,9 +1546,6 @@ constexpr bool test_interface() { assert(find_last_not_of_convertible_pos == str::npos); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { // operator+ const str first = get_cat(); const str second = get_dog(); @@ -1690,12 +1675,6 @@ constexpr bool test_interface() { } constexpr bool test_udls() { -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (is_constant_evaluated()) { - return true; - } -#endif // ^^^ workaround ^^^ - assert(equalRanges("purr purr"s, "purr purr"sv)); #ifdef __cpp_char8_t assert(equalRanges(u8"purr purr"s, "purr purr"sv)); @@ -1752,9 +1731,6 @@ constexpr bool test_iterators() { assert(*cit == CharType{'l'}); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { // advance auto it = literal_constructed.begin() + 2; assert(*it == CharType{'l'}); @@ -1783,9 +1759,6 @@ constexpr bool test_iterators() { assert(*cit == CharType{'n'}); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { // advance back auto it = literal_constructed.end() - 2; assert(*it == CharType{'n'}); @@ -1828,9 +1801,6 @@ constexpr bool test_iterators() { assert((it3 <=> it1) == strong_ordering::greater); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { // access const auto it = literal_constructed.begin() + 2; it[2] = CharType{'l'}; @@ -1886,9 +1856,6 @@ constexpr bool test_growth() { assert(v.capacity() == 1510); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { str v(1007, CharType{'a'}); @@ -1903,9 +1870,6 @@ constexpr bool test_growth() { assert(v.capacity() == 1510); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { str v(1007, CharType{'a'}); @@ -1924,9 +1888,6 @@ constexpr bool test_growth() { } } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { str v(1007, CharType{'a'}); @@ -1939,9 +1900,6 @@ constexpr bool test_growth() { assert(v.capacity() == 1510); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { str v(1007, CharType{'a'}); @@ -2059,12 +2017,6 @@ constexpr void test_copy_assign(const size_t id1, const size_t id2, const size_t template constexpr void test_move_ctor() { -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (is_constant_evaluated()) { - return; - } -#endif // ^^^ workaround ^^^ - using Str = basic_string, StationaryAlloc>; { // Allocated @@ -2093,12 +2045,6 @@ constexpr void test_move_ctor() { template constexpr void test_move_alloc_ctor(const size_t id1, const size_t id2) { -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (is_constant_evaluated()) { - return; - } -#endif // ^^^ workaround ^^^ - using Str = basic_string, StationaryAlloc>; { // Allocated @@ -2127,12 +2073,6 @@ constexpr void test_move_alloc_ctor(const size_t id1, const size_t id2) { template constexpr void test_move_assign(const size_t id1, const size_t id2, const size_t id3) { -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (is_constant_evaluated()) { - return; - } -#endif // ^^^ workaround ^^^ - using Str = basic_string, Alloc>; // Iterators are taken over if the allocators are equal and source is large diff --git a/tests/std/tests/P1004R2_constexpr_vector/test.cpp b/tests/std/tests/P1004R2_constexpr_vector/test.cpp index 8c02ccab4b3..a50b5383c62 100644 --- a/tests/std/tests/P1004R2_constexpr_vector/test.cpp +++ b/tests/std/tests/P1004R2_constexpr_vector/test.cpp @@ -425,9 +425,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-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { // erase vec erased{1, 2, 3, 4, 2, 3, 2}; erase(erased, 2); @@ -487,9 +484,6 @@ constexpr bool test_iterators() { assert(*cit == 2); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { // advance auto it = range_constructed.begin() + 2; assert(*it == 2); @@ -514,9 +508,6 @@ constexpr bool test_iterators() { assert(*cit == 4); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { // advance back auto it = range_constructed.end() - 2; assert(*it == 4); @@ -555,9 +546,6 @@ constexpr bool test_iterators() { assert(it3 >= it1); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { // access const auto it = range_constructed.begin() + 2; it[2] = 3; @@ -622,15 +610,10 @@ constexpr bool test_growth() { vector l(3, 47); -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ - { - v.insert(v.end(), l.begin(), l.end()); + v.insert(v.end(), l.begin(), l.end()); - assert(v.size() == 1003); - assert(v.capacity() == 1500); - } + assert(v.size() == 1003); + assert(v.capacity() == 1500); } { @@ -641,15 +624,10 @@ constexpr bool test_growth() { vector l(7000, 47); -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ - { - v.insert(v.end(), l.begin(), l.end()); + v.insert(v.end(), l.begin(), l.end()); - assert(v.size() == 8000); - assert(v.capacity() == 8000); - } + assert(v.size() == 8000); + assert(v.capacity() == 8000); } { @@ -658,15 +636,10 @@ constexpr bool test_growth() { assert(v.size() == 1000); assert(v.capacity() == 1000); -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ - { - v.insert(v.end(), 3, 47); + v.insert(v.end(), 3, 47); - assert(v.size() == 1003); - assert(v.capacity() == 1500); - } + assert(v.size() == 1003); + assert(v.capacity() == 1500); } { @@ -675,15 +648,10 @@ constexpr bool test_growth() { assert(v.size() == 1000); assert(v.capacity() == 1000); -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ - { - v.insert(v.end(), 7000, 47); + v.insert(v.end(), 7000, 47); - assert(v.size() == 8000); - assert(v.capacity() == 8000); - } + assert(v.size() == 8000); + assert(v.capacity() == 8000); } return true; diff --git a/tests/std/tests/P1004R2_constexpr_vector_bool/test.cpp b/tests/std/tests/P1004R2_constexpr_vector_bool/test.cpp index 1531a3fa672..93d5eb5a140 100644 --- a/tests/std/tests/P1004R2_constexpr_vector_bool/test.cpp +++ b/tests/std/tests/P1004R2_constexpr_vector_bool/test.cpp @@ -101,65 +101,38 @@ constexpr bool test_interface() { // Non allocator constructors vec size_default_constructed(5); assert(size_default_constructed.size() == 5); -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ - { - assert(all_of( - size_default_constructed.begin(), size_default_constructed.end(), [](const bool val) { return !val; })); - } + assert(all_of( + size_default_constructed.begin(), size_default_constructed.end(), [](const bool val) { return !val; })); vec size_value_constructed(5, true); assert(size_value_constructed.size() == 5); -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ - { - assert(all_of( - size_value_constructed.begin(), size_value_constructed.end(), [](const bool val) { return val; })); - } - -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ - { - vec range_constructed(begin(input), end(input)); - assert(equal(range_constructed.begin(), range_constructed.end(), begin(input), end(input))); - - vec initializer_list_constructed({true, true, false, true}); - assert(equal(initializer_list_constructed.begin(), initializer_list_constructed.end(), begin(input) + 2, - end(input))); - - vec copy_assigned = range_constructed; - assert( - equal(copy_assigned.begin(), copy_assigned.end(), range_constructed.begin(), range_constructed.end())); - - vec move_assigned = move(copy_assigned); - assert( - equal(move_assigned.begin(), move_assigned.end(), range_constructed.begin(), range_constructed.end())); - assert(copy_assigned.empty()); // implementation-specific assumption that moved-from is empty - } + assert( + all_of(size_value_constructed.begin(), size_value_constructed.end(), [](const bool val) { return val; })); + + vec range_constructed(begin(input), end(input)); + assert(equal(range_constructed.begin(), range_constructed.end(), begin(input), end(input))); + + vec initializer_list_constructed({true, true, false, true}); + assert(equal( + initializer_list_constructed.begin(), initializer_list_constructed.end(), begin(input) + 2, end(input))); + + vec copy_assigned = range_constructed; + assert(equal(copy_assigned.begin(), copy_assigned.end(), range_constructed.begin(), range_constructed.end())); + + vec move_assigned = move(copy_assigned); + assert(equal(move_assigned.begin(), move_assigned.end(), range_constructed.begin(), range_constructed.end())); + assert(copy_assigned.empty()); // implementation-specific assumption that moved-from is empty // special member functions vec default_constructed; assert(default_constructed.empty()); vec copy_constructed(size_default_constructed); -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ - { - assert(equal(copy_constructed.begin(), copy_constructed.end(), size_default_constructed.begin(), - size_default_constructed.end())); - } + assert(equal(copy_constructed.begin(), copy_constructed.end(), size_default_constructed.begin(), + size_default_constructed.end())); vec move_constructed(move(copy_constructed)); -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ - { - assert(equal(move_constructed.begin(), move_constructed.end(), size_default_constructed.begin(), - size_default_constructed.end())); - } + assert(equal(move_constructed.begin(), move_constructed.end(), size_default_constructed.begin(), + size_default_constructed.end())); assert(copy_constructed.empty()); // implementation-specific assumption that moved-from is empty // allocator constructors @@ -173,70 +146,42 @@ constexpr bool test_interface() { assert(al_default_constructed.get_allocator().soccc_generation == 3); vec al_copy_constructed(size_value_constructed, alloc); -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ - { - assert(all_of(al_copy_constructed.begin(), al_copy_constructed.end(), [](const bool val) { return val; })); - } + assert(all_of(al_copy_constructed.begin(), al_copy_constructed.end(), [](const bool val) { return val; })); assert(al_copy_constructed.get_allocator().id == 4); assert(al_copy_constructed.get_allocator().soccc_generation == 3); vec al_move_constructed(move(al_copy_constructed), alloc); -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ - { - assert(all_of(al_move_constructed.begin(), al_move_constructed.end(), [](const bool val) { return val; })); - } + assert(all_of(al_move_constructed.begin(), al_move_constructed.end(), [](const bool val) { return val; })); assert(al_copy_constructed.empty()); // implementation-specific assumption that moved-from is empty assert(al_move_constructed.get_allocator().id == 4); assert(al_move_constructed.get_allocator().soccc_generation == 3); vec al_size_default_constructed(5, alloc); assert(al_size_default_constructed.size() == 5); -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ - { - assert(all_of(al_size_default_constructed.begin(), al_size_default_constructed.end(), - [](const bool val) { return !val; })); - } + assert(all_of(al_size_default_constructed.begin(), al_size_default_constructed.end(), + [](const bool val) { return !val; })); assert(al_size_default_constructed.get_allocator().id == 4); assert(al_size_default_constructed.get_allocator().soccc_generation == 3); vec al_size_value_constructed(5, true, alloc); assert(al_size_value_constructed.size() == 5); -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ - { - assert(all_of(al_size_value_constructed.begin(), al_size_value_constructed.end(), - [](const bool val) { return val; })); - } + assert(all_of( + al_size_value_constructed.begin(), al_size_value_constructed.end(), [](const bool val) { return val; })); assert(al_size_value_constructed.get_allocator().id == 4); assert(al_size_value_constructed.get_allocator().soccc_generation == 3); -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ - { - vec al_range_constructed(begin(input), end(input), alloc); - assert(equal(al_range_constructed.begin(), al_range_constructed.end(), begin(input), end(input))); - assert(al_range_constructed.get_allocator().id == 4); - assert(al_range_constructed.get_allocator().soccc_generation == 3); - - vec al_initializer_list_constructed({true, true, false, true}, alloc); - assert(equal(al_initializer_list_constructed.begin(), al_initializer_list_constructed.end(), - begin(input) + 2, end(input))); - assert(al_initializer_list_constructed.get_allocator().id == 4); - assert(al_initializer_list_constructed.get_allocator().soccc_generation == 3); - } + vec al_range_constructed(begin(input), end(input), alloc); + assert(equal(al_range_constructed.begin(), al_range_constructed.end(), begin(input), end(input))); + assert(al_range_constructed.get_allocator().id == 4); + assert(al_range_constructed.get_allocator().soccc_generation == 3); + + vec al_initializer_list_constructed({true, true, false, true}, alloc); + assert(equal(al_initializer_list_constructed.begin(), al_initializer_list_constructed.end(), begin(input) + 2, + end(input))); + assert(al_initializer_list_constructed.get_allocator().id == 4); + assert(al_initializer_list_constructed.get_allocator().soccc_generation == 3); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { // assignment vec range_constructed(begin(input), end(input)); @@ -278,9 +223,6 @@ constexpr bool test_interface() { assert(alloc.soccc_generation == 0); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { // iterators vec range_constructed(begin(input), end(input)); const vec const_range_constructed(begin(input), end(input)); @@ -334,9 +276,6 @@ constexpr bool test_interface() { assert(*prev(cre2)); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { // access vec range_constructed(begin(input), end(input)); const vec const_range_constructed(begin(input), end(input)); @@ -385,9 +324,6 @@ constexpr bool test_interface() { assert(cb); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { // capacity vec range_constructed(begin(input), end(input)); @@ -416,9 +352,6 @@ constexpr bool test_interface() { assert(c2 == 32); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { // modifiers vec range_constructed(begin(input), end(input)); @@ -509,9 +442,6 @@ constexpr bool test_interface() { assert(emplaced.size() == 22); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access 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 @@ -524,9 +454,6 @@ constexpr bool test_interface() { assert(input_inserted.size() == size(num_arr)); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { // swap vec first{true, false, true}; vec second{false, false, true, false}; @@ -538,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-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { // erase vec erased{false, false, true, false, true}; erase(erased, false); @@ -553,9 +477,6 @@ constexpr bool test_interface() { assert(equal(erased_if.begin(), erased_if.end(), begin(expected_erase_if), end(expected_erase_if))); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ { // comparison vec first(begin(input), end(input)); vec second(begin(input), end(input)); @@ -590,12 +511,6 @@ constexpr bool test_interface() { } constexpr bool test_iterators() { -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (is_constant_evaluated()) { - return true; - } -#endif // ^^^ workaround ^^^ - vec range_constructed(begin(input), end(input)); { // increment diff --git a/tests/std/tests/P2321R2_proxy_reference/test.cpp b/tests/std/tests/P2321R2_proxy_reference/test.cpp index 59bdaa9e2ad..c9180eb5f7f 100644 --- a/tests/std/tests/P2321R2_proxy_reference/test.cpp +++ b/tests/std/tests/P2321R2_proxy_reference/test.cpp @@ -274,16 +274,12 @@ constexpr bool test() { { // Test vector::reference static_assert(is_assignable_v::reference, bool>); -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) - if (!is_constant_evaluated()) -#endif // ^^^ workaround ^^^ - { - vector vb{false}; - const vector::reference r = vb[0]; - - r = true; - assert(vb.front()); - } + + vector vb{false}; + const vector::reference r = vb[0]; + + r = true; + assert(vb.front()); } return true; diff --git a/tests/std/tests/VSO_0000000_allocator_propagation/test.cpp b/tests/std/tests/VSO_0000000_allocator_propagation/test.cpp index f419065724e..fb2a8b15466 100644 --- a/tests/std/tests/VSO_0000000_allocator_propagation/test.cpp +++ b/tests/std/tests/VSO_0000000_allocator_propagation/test.cpp @@ -295,13 +295,6 @@ _CONSTEXPR20 void test_sequence_swap(const size_t id1, const size_t id2) { template