From 4e1d839dacdcfedf11411d28027d427d629bc9e0 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Wed, 16 Apr 2025 13:28:14 -0700 Subject: [PATCH 01/11] Python 3.13.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 67357c4a121..897855be6d7 100644 --- a/azure-devops/provision-image.ps1 +++ b/azure-devops/provision-image.ps1 @@ -43,7 +43,7 @@ foreach ($workload in $VisualStudioWorkloads) { $PowerShellUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.5.0/PowerShell-7.5.0-win-x64.msi' $PowerShellArgs = @('/quiet', '/norestart') -$PythonUrl = 'https://www.python.org/ftp/python/3.13.2/python-3.13.2-amd64.exe' +$PythonUrl = 'https://www.python.org/ftp/python/3.13.3/python-3.13.3-amd64.exe' $PythonArgs = @('/quiet', 'InstallAllUsers=1', 'PrependPath=1', 'CompileAll=1', 'Include_doc=0') $CudaUrl = 'https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_551.61_windows.exe' From 500c33836f861e611a3510d6cb5938b47dd8c0c3 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Wed, 16 Apr 2025 14:17:04 -0700 Subject: [PATCH 02/11] New pool. --- azure-devops/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-devops/config.yml b/azure-devops/config.yml index 60d59b5502a..66b26be36c0 100644 --- a/azure-devops/config.yml +++ b/azure-devops/config.yml @@ -5,7 +5,7 @@ variables: - name: poolName - value: 'StlBuild-2025-03-11T1203-Pool' + value: 'StlBuild-2025-04-16T1328-Pool' readonly: true - name: poolDemands value: 'EnableSpotVM -equals false' From 1863f153c4566eed5370941440980a26b38c81d0 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Wed, 16 Apr 2025 14:18:10 -0700 Subject: [PATCH 03/11] VS 2022 17.14 Preview 3. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index aaecf28e1bc..ed00e479041 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.14 Preview 2 or later. +1. Install Visual Studio 2022 17.14 Preview 3 or later. * Select "Windows 11 SDK (10.0.22621.0)" in the VS Installer. * Select "MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools (Latest)" in the VS Installer if you would like to build the ARM64/ARM64EC target. @@ -160,7 +160,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.14 Preview 2 or later. +1. Install Visual Studio 2022 17.14 Preview 3 or later. * Select "Windows 11 SDK (10.0.22621.0)" in the VS Installer. * Select "MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools (Latest)" in the VS Installer if you would like to build the ARM64/ARM64EC target. From b6de58b80f5ebd6d19931554d35b612487f3610c Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Wed, 16 Apr 2025 14:24:06 -0700 Subject: [PATCH 04/11] Remove workaround for VSO-2283373 "EDG: Failure to compare pointers to array elements in a constant expression". --- .../test.compile.pass.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/std/tests/P2165R4_tuple_like_relational_operators/test.compile.pass.cpp b/tests/std/tests/P2165R4_tuple_like_relational_operators/test.compile.pass.cpp index b3574af17f8..7a6be94c7e9 100644 --- a/tests/std/tests/P2165R4_tuple_like_relational_operators/test.compile.pass.cpp +++ b/tests/std/tests/P2165R4_tuple_like_relational_operators/test.compile.pass.cpp @@ -76,13 +76,8 @@ constexpr bool test() { int a = 0; int b = 1; int c[2] = {2, 3}; -#ifdef __EDG__ // TRANSITION, VSO-2283373 - assert((tuple{&c[0], &c[1]} == subrange{&c[0], &c[1]})); - assert((tuple{&c[1], &c[0]} != subrange{&c[0], &c[1]})); -#else // ^^^ workaround / no workaround vvv static_assert(tuple{&c[0], &c[1]} == subrange{&c[0], &c[1]}); static_assert(tuple{&c[1], &c[0]} != subrange{&c[0], &c[1]}); -#endif // ^^^ no workaround ^^^ static_assert(is_eq(tuple{&a, &b} <=> pair{&a, &b})); static_assert(is_lt(tuple{&c[0], &c[0]} <=> pair{&c[0], &c[1]})); static_assert(is_gt(tuple{&c[1], &c[0]} <=> pair{&c[0], &c[1]})); From f0d46f8d4dbdfb5a4eceac7384f47ac62944ed77 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Wed, 16 Apr 2025 14:26:42 -0700 Subject: [PATCH 05/11] Remove workaround for DevCom-10107834 "EDG, decltype can't deduce type". --- tests/std/tests/P0088R3_variant/test.cpp | 4 ---- tests/std/tests/P0220R1_optional/test.cpp | 4 ---- 2 files changed, 8 deletions(-) diff --git a/tests/std/tests/P0088R3_variant/test.cpp b/tests/std/tests/P0088R3_variant/test.cpp index 5dd7c560ca5..5c44ad66c12 100644 --- a/tests/std/tests/P0088R3_variant/test.cpp +++ b/tests/std/tests/P0088R3_variant/test.cpp @@ -794,20 +794,16 @@ struct hash<::hash::B> { namespace hash { void test_hash_variant_enabled() { { -#ifndef __EDG__ // TRANSITION, DevCom-10107834 test_hash_enabled >(); test_hash_enabled >(); -#endif // ^^^ no workaround ^^^ } { test_hash_disabled>(); test_hash_disabled>(); } { -#ifndef __EDG__ // TRANSITION, DevCom-10107834 test_hash_enabled>(); test_hash_enabled>(); -#endif // ^^^ no workaround ^^^ } } diff --git a/tests/std/tests/P0220R1_optional/test.cpp b/tests/std/tests/P0220R1_optional/test.cpp index af8fe440199..caa83e68f17 100644 --- a/tests/std/tests/P0220R1_optional/test.cpp +++ b/tests/std/tests/P0220R1_optional/test.cpp @@ -861,20 +861,16 @@ int run_test() assert(std::hash>{}(opt) == std::hash{}(*opt)); } { -#ifndef __EDG__ // TRANSITION, DevCom-10107834 test_hash_enabled >(); test_hash_enabled >(); test_hash_enabled >(); test_hash_enabled >(); -#endif // ^^^ no workaround ^^^ test_hash_disabled>(); test_hash_disabled>(); -#ifndef __EDG__ // TRANSITION, DevCom-10107834 test_hash_enabled>(); test_hash_enabled>(); -#endif // ^^^ no workaround ^^^ } return 0; From d04423722962b4a9c1ae90c7a1a33240e5ec3b36 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Wed, 16 Apr 2025 14:28:24 -0700 Subject: [PATCH 06/11] Remove workaround for VSO-892705 "EDG reports __is_convertible_to(int[], int*) == false". --- .../tests/P0758R1_is_nothrow_convertible/test.compile.pass.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/std/tests/P0758R1_is_nothrow_convertible/test.compile.pass.cpp b/tests/std/tests/P0758R1_is_nothrow_convertible/test.compile.pass.cpp index ac615057e00..a83302dceb7 100644 --- a/tests/std/tests/P0758R1_is_nothrow_convertible/test.compile.pass.cpp +++ b/tests/std/tests/P0758R1_is_nothrow_convertible/test.compile.pass.cpp @@ -98,9 +98,7 @@ STATIC_ASSERT(is_nothrow_convertible_v); STATIC_ASSERT(is_nothrow_convertible_v); STATIC_ASSERT(is_nothrow_convertible_v); STATIC_ASSERT(is_nothrow_convertible_v); -#ifndef __EDG__ // TRANSITION, VSO-892705 STATIC_ASSERT(is_nothrow_convertible_v); -#endif // ^^^ no workaround ^^^ STATIC_ASSERT(is_nothrow_convertible_v); STATIC_ASSERT(!is_nothrow_convertible_v); STATIC_ASSERT(!is_nothrow_convertible_v); From 85e4311df7727141d0473e10d4080454b792ccc9 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Wed, 16 Apr 2025 14:31:22 -0700 Subject: [PATCH 07/11] Remove workaround for DevCom-1326684 "list-init of aggregate with explicitly-default-constructible member incorrectly accepted". --- tests/std/tests/P0898R3_concepts/test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/std/tests/P0898R3_concepts/test.cpp b/tests/std/tests/P0898R3_concepts/test.cpp index 7ec70ccbfa9..9d2e53d6e2d 100644 --- a/tests/std/tests/P0898R3_concepts/test.cpp +++ b/tests/std/tests/P0898R3_concepts/test.cpp @@ -1545,7 +1545,7 @@ namespace test_default_initializable { #endif // ^^^ no workaround ^^^ // Also test GH-1603 "default_initializable accepts types that are not default-initializable" -#if defined(__clang__) // TRANSITION, DevCom-1326684 (MSVC) and VSO-1898945 (EDG) +#ifndef __EDG__ // TRANSITION, VSO-1898945 static_assert(!default_initializable); #endif // ^^^ no workaround ^^^ } // namespace test_default_initializable From 9456a232d8c8b7a19fb461bb9b0f53f509c4f30b Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Wed, 16 Apr 2025 14:34:30 -0700 Subject: [PATCH 08/11] Remove workaround for VSO-2417491 "C1XX /permissive- (strict mode) mishandles a variable template detecting static constexpr member functions". --- stl/inc/random | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/stl/inc/random b/stl/inc/random index fa401b630cd..3a761531df1 100644 --- a/stl/inc/random +++ b/stl/inc/random @@ -402,12 +402,12 @@ bool _Nrand_for_tr1( } template -struct _Has_static_min_max : false_type {}; // TRANSITION, VSO-2417491: Should be a variable template +constexpr bool _Has_static_min_max = false; // This checks a requirement of N4981 [rand.req.urng] `concept uniform_random_bit_generator` but doesn't attempt // to implement the whole concept - we just need to distinguish Standard machinery from tr1 machinery. template -struct _Has_static_min_max<_Gen, void_t::value)>> : true_type {}; +constexpr bool _Has_static_min_max<_Gen, void_t::value)>> = true; template _NODISCARD _Real _Nrand_impl(_Gen& _Gx) { // build a floating-point value from random sequence @@ -415,7 +415,7 @@ _NODISCARD _Real _Nrand_impl(_Gen& _Gx) { // build a floating-point value from r constexpr auto _Digits = static_cast(numeric_limits<_Real>::digits); - if constexpr (_Has_static_min_max<_Gen>::value) { + if constexpr (_Has_static_min_max<_Gen>) { return _STD generate_canonical<_Real, _Digits>(_Gx); } else if constexpr (is_integral_v) { // TRANSITION, for integral tr1 machinery only; Standard machinery can call generate_canonical directly @@ -2308,8 +2308,7 @@ private: template result_type _Eval(_Engine& _Eng, _Ty _Min, _Ty _Max) const { // compute next value in range [_Min, _Max] - conditional_t<_Has_static_min_max<_Engine>::value, _Rng_from_urng_v2<_Uty, _Engine>, - _Rng_from_urng<_Uty, _Engine>> + conditional_t<_Has_static_min_max<_Engine>, _Rng_from_urng_v2<_Uty, _Engine>, _Rng_from_urng<_Uty, _Engine>> _Generator(_Eng); const _Uty _Umin = _Adjust(static_cast<_Uty>(_Min)); From 5eef5d15fea8100f6bf067c136e6ebb991ee388e Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Wed, 16 Apr 2025 16:03:04 -0700 Subject: [PATCH 09/11] Remove workaround for DevCom-10701277 "__builtin_memcmp() yields erroneous results if evaluated at compile time" (see GH 5322). --- tests/libcxx/expected_results.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index 3285f4d32ae..034f6f4a7e8 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -1186,10 +1186,6 @@ std/ranges/range.adaptors/range.join/range.join.iterator/star.pass.cpp:1 FAIL std/ranges/range.adaptors/range.join/range.join.iterator/iter.swap.pass.cpp:0 FAIL std/ranges/range.adaptors/range.join/range.join.iterator/iter.swap.pass.cpp:1 FAIL -# Not analyzed. Likely MSVC constexpr bug with negative chars passed to __builtin_memcmp. -std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/compare.pass.cpp:0 FAIL -std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/compare.pass.cpp:1 FAIL - # Not analyzed. Likely MSVC constexpr bug, "note: failure was caused by a read of a variable outside its lifetime" std/containers/views/mdspan/mdspan/index_operator.pass.cpp:0 FAIL std/containers/views/mdspan/mdspan/index_operator.pass.cpp:1 FAIL From 0e5d0d746ab69e02387b18e7a9bfd6ded7914280 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Wed, 16 Apr 2025 16:10:38 -0700 Subject: [PATCH 10/11] Change MSVC-internal skips to "likely bogus tests" failures, now that warning C5321 has shipped. --- tests/libcxx/expected_results.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index 034f6f4a7e8..7ea5abb808c 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -816,6 +816,15 @@ std/iterators/iterator.requirements/iterator.assoc.types/readable.traits/indirec std/containers/sequences/vector/trivial_relocation.pass.cpp:0 FAIL std/containers/sequences/vector/trivial_relocation.pass.cpp:1 FAIL +# These tests emit C5321, which warns when the resolution to CWG-1656 affects a u8 string literal. +# The conformant behavior is opt-in because it can silently change behavior. +# warning C5321: nonstandard extension used: encoding '\x80' as a multi-byte utf-8 character. Use \u instead +# for cross platform compatibility or '/Zc:u8EscapeEncoding' to disable the extension. +std/utilities/format/format.functions/escaped_output.unicode.pass.cpp:0 FAIL +std/utilities/format/format.functions/escaped_output.unicode.pass.cpp:1 FAIL +std/utilities/format/format.functions/fill.unicode.pass.cpp:0 FAIL +std/utilities/format/format.functions/fill.unicode.pass.cpp:1 FAIL + # *** LIKELY STL BUGS *** # Not analyzed, likely STL bugs. Various assertions. @@ -1469,10 +1478,3 @@ std/input.output/string.streams/stringstream/stringstream.members/gcount.pass.cp # Similarly, this test is marked as `REQUIRES: 32-bit-pointer`. std/iterators/iterator.container/ssize.LWG3207.compile.pass.cpp:9 SKIPPED - -# These tests emit C5321, which warns when the resolution to CWG-1656 affects a u8 string literal. -# The conformant behavior is opt-in because it can silently change behavior. -# warning C5321: nonstandard extension used: encoding '\x80' as a multi-byte utf-8 character. Use \u instead -# for cross platform compatibility or '/Zc:u8EscapeEncoding' to disable the extension. -std/utilities/format/format.functions/escaped_output.unicode.pass.cpp:9 SKIPPED -std/utilities/format/format.functions/fill.unicode.pass.cpp:9 SKIPPED From 17397761be8713ef469df48fcbf12a89750a94aa Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Wed, 16 Apr 2025 18:16:22 -0700 Subject: [PATCH 11/11] Add a compiler version check to CMakeLists.txt. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 40775a257f2..f66dc08858f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,10 @@ cmake_minimum_required(VERSION 3.30.0) set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) project(msvc_standard_libraries LANGUAGES CXX) +if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.44.35109.1") + message(FATAL_ERROR "The STL must be built with VS 2022 17.14 Preview 3 or later.") +endif() + include(CheckCXXSourceCompiles) check_cxx_source_compiles([=[ #include