From a9ecd92ac9c486c93066fb828bbb433a09653a41 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 13 Apr 2023 19:43:50 -0700 Subject: [PATCH 01/10] Toolset update: VS 2022 17.6 Preview 3 (#3651) --- .github/ISSUE_TEMPLATE/bug-report.md | 33 ++-- CMakeLists.txt | 2 +- README.md | 8 +- azure-devops/create-1es-hosted-pool.ps1 | 22 ++- azure-devops/provision-image.ps1 | 29 +--- azure-pipelines.yml | 2 +- benchmarks/CMakeLists.txt | 2 +- stl/CMakeLists.txt | 2 +- stl/inc/array | 13 -- stl/inc/atomic | 20 +-- stl/inc/chrono | 2 +- stl/inc/execution | 2 +- stl/inc/tuple | 12 -- stl/inc/xatomic.h | 2 +- stl/inc/xfilesystem_abi.h | 4 - .../include/test_header_units_and_modules.hpp | 4 - .../tests/P0980R1_constexpr_strings/test.cpp | 60 ------- .../tests/P1004R2_constexpr_vector/test.cpp | 58 ++----- .../P1004R2_constexpr_vector_bool/test.cpp | 150 +++++------------- .../tests/P2321R2_proxy_reference/test.cpp | 16 +- .../P2465R3_standard_library_modules/env.lst | 3 +- .../test.cpp | 70 +++----- .../test.cpp | 18 +-- tools/CMakeLists.txt | 2 +- tools/format/CMakeLists.txt | 2 +- tools/validate/CMakeLists.txt | 2 +- 26 files changed, 152 insertions(+), 388 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 13aae520361..193077082e0 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -7,13 +7,13 @@ assignees: '' --- -**Describe the bug** +# Describe the bug A clear and concise description of what the bug is. Please check that you've read the guidelines for submitting STL bug reports in `README.md`. If you are having problems with any component that is not the STL, instructions to get to the right place are there. -**Command-line test case** +# Command-line test case ``` C:\Temp>type repro.cpp #include @@ -26,12 +26,18 @@ int main() { std::cout << "test failure\n"; } -C:\Temp>cl /EHsc /W4 /WX .\repro.cpp -Microsoft (R) C/C++ Optimizing Compiler Version 19.23.28019.1 for x64 +C:\Temp>cl /EHsc /W4 /WX /std:c++latest .\repro.cpp +Microsoft (R) C/C++ Optimizing Compiler Version 19.36.32522 for x64 Copyright (C) Microsoft Corporation. All rights reserved. +/std:c++latest is provided as a preview of language features from the latest C++ +working draft, and we're eager to hear about bugs and suggestions for improvements. +However, note that these features are provided as-is without support, and subject +to changes or removal as the working draft evolves. See +https://go.microsoft.com/fwlink/?linkid=2045807 for details. + repro.cpp -Microsoft (R) Incremental Linker Version 14.23.28019.1 +Microsoft (R) Incremental Linker Version 14.36.32522.0 Copyright (C) Microsoft Corporation. All rights reserved. /out:repro.exe @@ -41,25 +47,24 @@ C:\Temp>.\repro.exe test failure ``` -**Expected behavior** +# Expected behavior A clear and concise description of what you expected to happen. Alternatively, include `static_assert` or `assert` lines in your test case above whose failure clearly indicates the problem. -**STL version** +# STL version * Option 1: Visual Studio version - * Displayed in Help > About Microsoft Visual Studio - * Example: + + Help > About Microsoft Visual Studio > Copy Info, we need only the first two lines + + Example: ``` - Microsoft Visual Studio Community 2019 Preview - Version 16.5.0 Preview 5.0 + Microsoft Visual Studio Community 2022 + Version 17.6.0 Preview 3.0 ``` - * Option 2: git commit hash - * Example: + + Example: ``` https://github.com/microsoft/STL/commit/2195148 ``` -**Additional context** +# Additional context Add any other context about the problem here. 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 6e48b4eb109..af9dd095d39 100644 --- a/README.md +++ b/README.md @@ -141,11 +141,11 @@ 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. - * 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, @@ -157,11 +157,11 @@ 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. - * 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/azure-devops/create-1es-hosted-pool.ps1 b/azure-devops/create-1es-hosted-pool.ps1 index aad0f0b722e..232464f305f 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' @@ -207,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 ` @@ -305,6 +318,7 @@ New-AzGalleryImageDefinition ` -Publisher $ImagePublisher ` -Offer $ImageOffer ` -Sku $ImageSku ` + -Feature @(@{ Name = 'SecurityType'; Value = 'TrustedLaunch'; }) ` -HyperVGeneration 'V2' | Out-Null #################################################################################################### diff --git a/azure-devops/provision-image.ps1 b/azure-devops/provision-image.ps1 index c0da5f4b8d4..c5731b52fb1 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' @@ -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', @@ -138,10 +135,8 @@ $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' +$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' @@ -187,19 +182,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 { @@ -213,16 +200,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 } 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: 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/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 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 diff --git a/stl/inc/atomic b/stl/inc/atomic index ebef69084d8..e4043659949 100644 --- a/stl/inc/atomic +++ b/stl/inc/atomic @@ -56,11 +56,11 @@ extern "C" _NODISCARD char __stdcall __std_atomic_has_cmpxchg16b() noexcept; // Controls whether ARM64 ldar/ldapr/stlr should be used #ifndef _STD_ATOMIC_USE_ARM64_LDAR_STLR #if defined(_M_ARM64) || defined(_M_ARM64EC) -#if defined(_HAS_ARM64_LOAD_ACQUIRE) && _HAS_ARM64_LOAD_ACQUIRE == 1 // TRANSITION, VS 2022 17.7 Preview 1 -#define _STD_ATOMIC_USE_ARM64_LDAR_STLR 1 -#else // ^^^ updated intrin0.inl.h is available / workaround vvv +#ifdef __clang__ // TRANSITION, LLVM-62103 #define _STD_ATOMIC_USE_ARM64_LDAR_STLR 0 -#endif // ^^^ workaround ^^^ +#else // ^^^ Clang doesn't support new intrinsics / __load_acquire/__stlr intrinsics are available vvv +#define _STD_ATOMIC_USE_ARM64_LDAR_STLR 1 +#endif // ^^^ __load_acquire/__stlr intrinsics are available ^^^ #else // ^^^ ARM64/ARM64EC / Other architectures vvv #define _STD_ATOMIC_USE_ARM64_LDAR_STLR 0 #endif // defined(_M_ARM64) || defined(_M_ARM64EC) @@ -141,7 +141,7 @@ extern "C" inline void _Check_memory_order(const unsigned int _Order) noexcept { #if _STD_ATOMIC_USE_ARM64_LDAR_STLR == 1 #define __LOAD_ACQUIRE_ARM64(_Width, _Ptr) \ - __load_acquire##_Width(reinterpret_cast(_Ptr)) + static_cast<__int##_Width>(__load_acquire##_Width(reinterpret_cast(_Ptr))) #define _ATOMIC_LOAD_ARM64(_Result, _Width, _Ptr, _Order_var) \ switch (_Order_var) { \ @@ -184,7 +184,8 @@ extern "C" inline void _Check_memory_order(const unsigned int _Order) noexcept { #define __STORE_RELEASE(_Width, _Ptr, _Desired) \ _Compiler_barrier(); \ - __stlr##_Width(reinterpret_cast(_Ptr), (_Desired)); + __stlr##_Width( \ + reinterpret_cast(_Ptr), static_cast(_Desired)); #else // ^^^ _STD_ATOMIC_USE_ARM64_LDAR_STLR == 1 ^^^ / vvv _STD_ATOMIC_USE_ARM64_LDAR_STLR == 0 vvv @@ -214,9 +215,10 @@ extern "C" inline void _Check_memory_order(const unsigned int _Order) noexcept { _Memory_barrier(); #if _STD_ATOMIC_USE_ARM64_LDAR_STLR == 1 -#define _ATOMIC_STORE_SEQ_CST_ARM64(_Width, _Ptr, _Desired) \ - _Compiler_barrier(); \ - __stlr##_Width(reinterpret_cast(_Ptr), (_Desired)); \ +#define _ATOMIC_STORE_SEQ_CST_ARM64(_Width, _Ptr, _Desired) \ + _Compiler_barrier(); \ + __stlr##_Width( \ + reinterpret_cast(_Ptr), static_cast(_Desired)); \ _Memory_barrier(); #else #define _ATOMIC_STORE_SEQ_CST_ARM64 _ATOMIC_STORE_SEQ_CST_ARM 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; 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/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)>{}); 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 { 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 { diff --git a/tests/std/include/test_header_units_and_modules.hpp b/tests/std/include/test_header_units_and_modules.hpp index f439720a118..33fc4115a77 100644 --- a/tests/std/include/test_header_units_and_modules.hpp +++ b/tests/std/include/test_header_units_and_modules.hpp @@ -661,11 +661,7 @@ constexpr bool impl_test_source_location() { using namespace std; const auto sl = source_location::current(); assert(sl.line() == __LINE__ - 1); -#if defined(_MSVC_INTERNAL_TESTING) || _MSC_FULL_VER >= 193632502 // TRANSITION, VS 2022 17.6 Preview 2 assert(sl.column() == 38); -#else // ^^^ no workaround / workaround vvv - assert(sl.column() == 1); -#endif // ^^^ workaround ^^^ #if defined(__clang__) || defined(__EDG__) // TRANSITION, DevCom-10199227 and LLVM-58951 assert(sl.function_name() == "impl_test_source_location"sv); #else // ^^^ workaround / no workaround vvv 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 8bda2b9dcdb..37f298cb379 100644 --- a/tests/std/tests/P1004R2_constexpr_vector/test.cpp +++ b/tests/std/tests/P1004R2_constexpr_vector/test.cpp @@ -326,7 +326,7 @@ constexpr bool test_interface() { assert(c2 == 6); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726729 (attempt to access run-time storage) +#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1799670 (expired storage) if (!is_constant_evaluated()) #endif // ^^^ workaround ^^^ { // modifiers @@ -428,9 +428,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); @@ -490,9 +487,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); @@ -517,9 +511,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); @@ -558,9 +549,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; @@ -625,15 +613,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); } { @@ -644,15 +627,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); } { @@ -661,15 +639,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); } { @@ -678,15 +651,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..07c4cba9c77 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; })); - } + 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 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 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 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 - } + 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,7 +352,7 @@ constexpr bool test_interface() { assert(c2 == 32); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) +#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1799670 (expired storage) if (!is_constant_evaluated()) #endif // ^^^ workaround ^^^ { // modifiers @@ -509,7 +445,7 @@ constexpr bool test_interface() { assert(emplaced.size() == 22); } -#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1726722 (attempt to access expired storage) +#if defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1799670 (expired storage) if (!is_constant_evaluated()) #endif // ^^^ workaround ^^^ { @@ -524,9 +460,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,7 +471,7 @@ 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 defined(__EDG__) && _ITERATOR_DEBUG_LEVEL == 2 // TRANSITION, VSO-1799670 (expired storage) if (!is_constant_evaluated()) #endif // ^^^ workaround ^^^ { // erase @@ -553,9 +486,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 +520,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/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" 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) { diff --git a/tests/std/tests/VSO_0000000_allocator_propagation/test.cpp b/tests/std/tests/VSO_0000000_allocator_propagation/test.cpp index f419065724e..9e20357992f 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