diff --git a/.gitignore b/.gitignore index 961cfd602f3..f9438ec8ca5 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,4 @@ __pycache__/ /out/ /tools/out/ /CMakeLists.txt.user -/*.log +*.log diff --git a/README.md b/README.md index 02ade81ea2d..2600f98cee3 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.13 Preview 4 or later. +1. Install Visual Studio 2022 17.14 Preview 1 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.13 Preview 4 or later. +1. Install Visual Studio 2022 17.14 Preview 1 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. diff --git a/azure-devops/config.yml b/azure-devops/config.yml index fc8be111087..732fe64fe9f 100644 --- a/azure-devops/config.yml +++ b/azure-devops/config.yml @@ -5,7 +5,7 @@ variables: - name: poolName - value: 'StlBuild-2025-01-28T1106-Pool' + value: 'StlBuild-2025-02-15T0137-Pool' readonly: true - name: poolDemands value: 'EnableSpotVM -equals false' diff --git a/azure-devops/create-1es-hosted-pool.ps1 b/azure-devops/create-1es-hosted-pool.ps1 index 205e17ad75f..aa99a024346 100644 --- a/azure-devops/create-1es-hosted-pool.ps1 +++ b/azure-devops/create-1es-hosted-pool.ps1 @@ -18,8 +18,9 @@ $VMSize = 'Standard_F32as_v6' $ProtoVMName = 'PROTOTYPE' $ImagePublisher = 'MicrosoftWindowsServer' $ImageOffer = 'WindowsServer' -$ImageSku = '2025-datacenter-g2' +$ImageSku = '2025-datacenter-azure-edition' +$LogFile = '1es-hosted-pool.log' $ProgressActivity = 'Preparing STL CI pool' $TotalProgress = 26 $CurrentProgress = 1 @@ -78,13 +79,13 @@ $Env:SuppressAzurePowerShellBreakingChangeWarnings = 'true' Update-AzConfig ` -DisplayBreakingChangeWarning $false ` - -Scope 'Process' | Out-Null + -Scope 'Process' >> $LogFile #################################################################################################### Display-ProgressBar -Status 'Setting the subscription context' Set-AzContext ` - -SubscriptionName 'CPP_STL_GitHub' | Out-Null + -SubscriptionName 'CPP_STL_GitHub' >> $LogFile #################################################################################################### Display-ProgressBar -Status 'Creating resource group' @@ -93,7 +94,7 @@ $ResourceGroupName = 'StlBuild-' + $CurrentDate.ToString('yyyy-MM-ddTHHmm') New-AzResourceGroup ` -Name $ResourceGroupName ` - -Location $Location | Out-Null + -Location $Location >> $LogFile #################################################################################################### Display-ProgressBar -Status 'Creating credentials' @@ -169,7 +170,7 @@ $VM = Set-AzVMBootDiagnostic ` New-AzVm ` -ResourceGroupName $ResourceGroupName ` -Location $Location ` - -VM $VM | Out-Null + -VM $VM >> $LogFile $VM = Get-AzVM ` -ResourceGroupName $ResourceGroupName ` @@ -192,7 +193,7 @@ if ($ProvisionImageResult.value.Message -cnotmatch 'PROVISION_IMAGE_SUCCEEDED') Stop-AzVM ` -Id $VM.ID ` - -Force | Out-Null + -Force >> $LogFile Write-Error "VM stopped. Remember to delete unusable resource group: $ResourceGroupName" } @@ -201,7 +202,7 @@ if ($ProvisionImageResult.value.Message -cnotmatch 'PROVISION_IMAGE_SUCCEEDED') Display-ProgressBar -Status 'Restarting VM' Restart-AzVM ` - -Id $VM.ID | Out-Null + -Id $VM.ID >> $LogFile #################################################################################################### Display-ProgressBar -Status 'Sleeping after restart' @@ -216,7 +217,7 @@ Display-ProgressBar -Status 'Running sysprep in VM' Invoke-AzVMRunCommand ` -ResourceId $VM.ID ` -CommandId 'RunPowerShellScript' ` - -ScriptString 'C:\Windows\system32\sysprep\sysprep.exe /oobe /generalize /mode:vm /shutdown' | Out-Null + -ScriptString 'C:\Windows\system32\sysprep\sysprep.exe /oobe /generalize /mode:vm /shutdown' >> $LogFile #################################################################################################### Display-ProgressBar -Status 'Waiting for VM to shut down' @@ -230,14 +231,14 @@ Display-ProgressBar -Status 'Stopping VM' Stop-AzVM ` -Id $VM.ID ` - -Force | Out-Null + -Force >> $LogFile #################################################################################################### Display-ProgressBar -Status 'Generalizing VM' Set-AzVM ` -Id $VM.ID ` - -Generalized | Out-Null + -Generalized >> $LogFile #################################################################################################### Display-ProgressBar -Status 'Creating gallery' @@ -256,7 +257,7 @@ $ServicePrincipalObjectId = (Get-AzADServicePrincipal -DisplayName '1ES Resource New-AzRoleAssignment ` -ObjectId $ServicePrincipalObjectId ` -RoleDefinitionName 'Reader' ` - -Scope $Gallery.Id | Out-Null + -Scope $Gallery.Id >> $LogFile #################################################################################################### Display-ProgressBar -Status 'Creating image definition' @@ -276,7 +277,7 @@ New-AzGalleryImageDefinition ` -Offer $ImageOffer ` -Sku $ImageSku ` -Feature $ImageDefinitionFeatures ` - -HyperVGeneration 'V2' | Out-Null + -HyperVGeneration 'V2' >> $LogFile #################################################################################################### Display-ProgressBar -Status 'Creating image version' @@ -294,7 +295,7 @@ $ImageVersion = New-AzGalleryImageVersion ` Display-ProgressBar -Status 'Registering CloudTest resource provider' Register-AzResourceProvider ` - -ProviderNamespace 'Microsoft.CloudTest' | Out-Null + -ProviderNamespace 'Microsoft.CloudTest' >> $LogFile #################################################################################################### Display-ProgressBar -Status 'Creating 1ES image' @@ -306,7 +307,7 @@ New-AzResource ` -ResourceType 'Microsoft.CloudTest/Images' ` -ResourceName $ImageName ` -Properties @{ 'imageType' = 'SharedImageGallery'; 'resourceId' = $ImageVersion.Id; } ` - -Force | Out-Null + -Force >> $LogFile #################################################################################################### Display-ProgressBar -Status 'Creating 1ES Hosted Pool' @@ -328,14 +329,14 @@ New-AzResource ` -ResourceType 'Microsoft.CloudTest/hostedpools' ` -ResourceName $PoolName ` -Properties $PoolProperties ` - -Force | Out-Null + -Force >> $LogFile #################################################################################################### Display-ProgressBar -Status 'Deleting unused VM' Remove-AzVM ` -Id $VM.ID ` - -Force | Out-Null + -Force >> $LogFile #################################################################################################### Display-ProgressBar -Status 'Deleting unused disk' @@ -343,7 +344,7 @@ Display-ProgressBar -Status 'Deleting unused disk' Remove-AzDisk ` -ResourceGroupName $ResourceGroupName ` -DiskName $PrototypeOSDiskName ` - -Force | Out-Null + -Force >> $LogFile #################################################################################################### Display-ProgressBar -Status 'Deleting unused network interface' @@ -351,7 +352,7 @@ Display-ProgressBar -Status 'Deleting unused network interface' Remove-AzNetworkInterface ` -ResourceGroupName $ResourceGroupName ` -Name $NicName ` --Force | Out-Null +-Force >> $LogFile #################################################################################################### Display-ProgressBar -Status 'Deleting unused virtual network' @@ -359,7 +360,7 @@ Display-ProgressBar -Status 'Deleting unused virtual network' Remove-AzVirtualNetwork ` -ResourceGroupName $ResourceGroupName ` -Name $VirtualNetworkName ` --Force | Out-Null +-Force >> $LogFile #################################################################################################### Display-ProgressBar -Status 'Deleting unused network security group' @@ -367,7 +368,7 @@ Display-ProgressBar -Status 'Deleting unused network security group' Remove-AzNetworkSecurityGroup ` -ResourceGroupName $ResourceGroupName ` -Name $NetworkSecurityGroupName ` --Force | Out-Null +-Force >> $LogFile #################################################################################################### Write-Progress -Activity $ProgressActivity -Completed diff --git a/azure-devops/provision-image.ps1 b/azure-devops/provision-image.ps1 index 6a29f6e03f1..ea42153a8d5 100644 --- a/azure-devops/provision-image.ps1 +++ b/azure-devops/provision-image.ps1 @@ -43,11 +43,13 @@ 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.1/python-3.13.1-amd64.exe' +$PythonUrl = 'https://www.python.org/ftp/python/3.13.2/python-3.13.2-amd64.exe' $PythonArgs = @('/quiet', 'InstallAllUsers=1', 'PrependPath=1', 'CompileAll=1', 'Include_doc=0') +# TRANSITION, GH-5282: Install only nvcc and cudart, then manually add CUDA to the PATH (see below). $CudaUrl = 'https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_551.61_windows.exe' -$CudaArgs = @('-s', '-n', 'nvcc_12.4') +$CudaArgs = @('-s', '-n', 'nvcc_12.4', 'cudart_12.4') +$CudaPath = 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\bin' <# .SYNOPSIS @@ -112,6 +114,12 @@ DownloadAndInstall -Name 'CUDA' -Url $CudaUrl -Args $CudaArgs Write-Host 'Setting environment variables...' +# TRANSITION, GH-5282: Manually add CUDA to the PATH. +# Don't use $Env:PATH here - that's the local path for this running script, captured before we installed anything. +# The machine path was just updated by the installers above. +$machinePath = [Environment]::GetEnvironmentVariable('Path', 'Machine') +[Environment]::SetEnvironmentVariable('Path', "$machinePath;$CudaPath", 'Machine') + # The STL's PR/CI builds are totally unrepresentative of customer usage. [Environment]::SetEnvironmentVariable('VSCMD_SKIP_SENDTELEMETRY', '1', 'Machine') diff --git a/benchmarks/google-benchmark b/benchmarks/google-benchmark index a6ad7fbbdc2..c58e6d07105 160000 --- a/benchmarks/google-benchmark +++ b/benchmarks/google-benchmark @@ -1 +1 @@ -Subproject commit a6ad7fbbdc2e14fab82bb8a6d27760d700198cbf +Subproject commit c58e6d0710581e3a08d65c349664128a8d9a2461 diff --git a/stl/inc/__msvc_bit_utils.hpp b/stl/inc/__msvc_bit_utils.hpp index 48567e8d523..a89221adec0 100644 --- a/stl/inc/__msvc_bit_utils.hpp +++ b/stl/inc/__msvc_bit_utils.hpp @@ -337,19 +337,19 @@ constexpr decltype(auto) _Select_countr_zero_impl(_Fn _Callback) { #if _HAS_TZCNT_BSF_INTRINSICS && _HAS_CXX20 if (!_STD is_constant_evaluated()) { #ifdef __AVX2__ - return _Callback([](_Ty _Val) _STATIC_CALL_OPERATOR { return _Countr_zero_tzcnt(_Val); }); + return _Callback([](_Ty _Val) _STATIC_LAMBDA { return _Countr_zero_tzcnt(_Val); }); #else // ^^^ AVX2 / not AVX2 vvv const bool _Definitely_have_tzcnt = __isa_available >= _Stl_isa_available_avx2; if (_Definitely_have_tzcnt) { - return _Callback([](_Ty _Val) _STATIC_CALL_OPERATOR { return _Countr_zero_tzcnt(_Val); }); + return _Callback([](_Ty _Val) _STATIC_LAMBDA { return _Countr_zero_tzcnt(_Val); }); } else { - return _Callback([](_Ty _Val) _STATIC_CALL_OPERATOR { return _Countr_zero_bsf(_Val); }); + return _Callback([](_Ty _Val) _STATIC_LAMBDA { return _Countr_zero_bsf(_Val); }); } #endif // ^^^ not AVX2 ^^^ } #endif // ^^^ _HAS_TZCNT_BSF_INTRINSICS && _HAS_CXX20 ^^^ // C++17 constexpr gcd() calls this function, so it should be constexpr unless we detect runtime evaluation. - return _Callback([](_Ty _Val) _STATIC_CALL_OPERATOR { return _Countr_zero_fallback(_Val); }); + return _Callback([](_Ty _Val) _STATIC_LAMBDA { return _Countr_zero_fallback(_Val); }); } template , int> = 0> @@ -376,13 +376,13 @@ _CONSTEXPR20 decltype(auto) _Select_popcount_impl(_Fn _Callback) { #if !_POPCNT_INTRINSICS_ALWAYS_AVAILABLE const bool _Definitely_have_popcnt = __isa_available >= _Stl_isa_available_sse42; if (!_Definitely_have_popcnt) { - return _Callback([](_Ty _Val) _STATIC_CALL_OPERATOR { return _Popcount_fallback(_Val); }); + return _Callback([](_Ty _Val) _STATIC_LAMBDA { return _Popcount_fallback(_Val); }); } #endif // ^^^ !_POPCNT_INTRINSICS_ALWAYS_AVAILABLE ^^^ - return _Callback([](_Ty _Val) _STATIC_CALL_OPERATOR { return _Unchecked_popcount(_Val); }); + return _Callback([](_Ty _Val) _STATIC_LAMBDA { return _Unchecked_popcount(_Val); }); } #endif // ^^^ _HAS_POPCNT_INTRINSICS ^^^ - return _Callback([](_Ty _Val) _STATIC_CALL_OPERATOR { return _Popcount_fallback(_Val); }); + return _Callback([](_Ty _Val) _STATIC_LAMBDA { return _Popcount_fallback(_Val); }); } #undef _HAS_POPCNT_INTRINSICS diff --git a/stl/inc/__msvc_ranges_to.hpp b/stl/inc/__msvc_ranges_to.hpp index f13f2026a05..768f6e31756 100644 --- a/stl/inc/__msvc_ranges_to.hpp +++ b/stl/inc/__msvc_ranges_to.hpp @@ -1145,7 +1145,7 @@ namespace ranges { "the default-constructed object. (N4981 [range.utility.conv.to]/2.1.5)"); } } else if constexpr (input_range>) { - const auto _Xform = [](auto&& _Elem) _STATIC_CALL_OPERATOR { + const auto _Xform = [](auto&& _Elem) _STATIC_LAMBDA { return _RANGES to>(_STD forward(_Elem)); }; return _RANGES to<_Container>(views::transform(ref_view{_Range}, _Xform), _STD forward<_Types>(_Args)...); diff --git a/stl/inc/__msvc_ranges_tuple_formatter.hpp b/stl/inc/__msvc_ranges_tuple_formatter.hpp index 5d1989e5a66..eeb768995f6 100644 --- a/stl/inc/__msvc_ranges_tuple_formatter.hpp +++ b/stl/inc/__msvc_ranges_tuple_formatter.hpp @@ -241,7 +241,7 @@ class basic_format_arg { template explicit handle(_Ty& _Val) noexcept : _Ptr(_STD addressof(_Val)), _Format([](basic_format_parse_context<_CharType>& _Parse_ctx, - _Context& _Format_ctx, const void* _Ptr) _STATIC_CALL_OPERATOR { + _Context& _Format_ctx, const void* _Ptr) _STATIC_LAMBDA { using _Td = remove_const_t<_Ty>; // doesn't drop const-qualifier per an unnumbered LWG issue using _Tq = conditional_t<_Formattable_with, const _Ty, _Ty>; diff --git a/stl/inc/experimental/filesystem b/stl/inc/experimental/filesystem index 71f762adaad..f8d475a1e92 100644 --- a/stl/inc/experimental/filesystem +++ b/stl/inc/experimental/filesystem @@ -851,7 +851,7 @@ public: path& append(const basic_string<_Elem, _Traits, _Alloc>& _Str0) { // append arbitrary source string string_type _Str(_Str0.size(), L'\0'); // convert _Elem and '/' to '\' - _STD transform(_Str0.begin(), _Str0.end(), _Str.begin(), [](const _Elem _Ch) _STATIC_CALL_OPERATOR { + _STD transform(_Str0.begin(), _Str0.end(), _Str.begin(), [](const _Elem _Ch) _STATIC_LAMBDA { auto _Wch = static_cast(_Ch); if (_Wch == _FS_SLASH) { _Wch = _FS_PREF; diff --git a/stl/inc/functional b/stl/inc/functional index 7ed26be7e7c..33d51be9a3b 100644 --- a/stl/inc/functional +++ b/stl/inc/functional @@ -1237,7 +1237,7 @@ _NON_MEMBER_CALL(_FUNCTION_POINTER_DEDUCTION_GUIDE, X1, X2, X3) template struct _Deduce_from_call_operator : _Is_memfunptr<_Call_op>::_Guide_type {}; // N4958 [func.wrap.func.con]/16.1 -#ifdef __cpp_static_call_operator +#if _HAS_CXX23 template struct _Inspect_static_call_operator {}; @@ -1257,7 +1257,7 @@ _NON_MEMBER_CALL(_STATIC_CALL_OPERATOR_GUIDES, , , noexcept) template struct _Deduce_from_call_operator<_Fx, _Call_op, void_t().operator())>> : _Inspect_static_call_operator<_Call_op> {}; // N4958 [func.wrap.func.con]/16.2 -#endif // ^^^ defined(__cpp_static_call_operator) ^^^ +#endif // _HAS_CXX23 template struct _Deduce_signature {}; // can't deduce signature when &_Fx::operator() is missing, inaccessible, or ambiguous diff --git a/stl/inc/memory_resource b/stl/inc/memory_resource index 141524b3b40..59aee2f5fc0 100644 --- a/stl/inc/memory_resource +++ b/stl/inc/memory_resource @@ -553,9 +553,9 @@ namespace pmr { // find the pool from which to allocate a block with size _Bytes and alignment _Align const size_t _Size = (_STD max)(_Bytes + sizeof(void*), _Align); const auto _Log_of_size = static_cast(_Ceiling_of_log_2(_Size)); - return {_STD lower_bound(_Pools.begin(), _Pools.end(), _Log_of_size, - [](const _Pool& _Al, const unsigned char _Log) - _STATIC_CALL_OPERATOR { return _Al._Log_of_size < _Log; }), + return { + _STD lower_bound(_Pools.begin(), _Pools.end(), _Log_of_size, + [](const _Pool& _Al, const unsigned char _Log) _STATIC_LAMBDA { return _Al._Log_of_size < _Log; }), _Log_of_size}; } diff --git a/stl/inc/mutex b/stl/inc/mutex index 0daa8314b5b..6e333716403 100644 --- a/stl/inc/mutex +++ b/stl/inc/mutex @@ -480,7 +480,7 @@ public: : _MyMutexes(_Mtxes...) {} // construct but don't lock ~scoped_lock() noexcept { - _STD apply([](_Mutexes&... _Mtxes) _STATIC_CALL_OPERATOR { (..., (void) _Mtxes.unlock()); }, _MyMutexes); + _STD apply([](_Mutexes&... _Mtxes) _STATIC_LAMBDA { (..., (void) _Mtxes.unlock()); }, _MyMutexes); } scoped_lock(const scoped_lock&) = delete; diff --git a/stl/inc/ranges b/stl/inc/ranges index 3af972f8847..821e2aad4e4 100644 --- a/stl/inc/ranges +++ b/stl/inc/ranges @@ -3301,7 +3301,7 @@ namespace ranges { _NODISCARD constexpr decltype(auto) operator*() const { using _Ref = common_reference_t, iter_reference_t<_PatternIter>>; - return _Visit_inner_it<_Ref>([](auto&& _It) _STATIC_CALL_OPERATOR -> _Ref { return *_It; }); + return _Visit_inner_it<_Ref>([](auto&& _It) _STATIC_LAMBDA -> _Ref { return *_It; }); } constexpr _Iterator& operator++() { @@ -7189,14 +7189,13 @@ namespace ranges { noexcept((noexcept(*(_STD declval>&>())) && ...)) /* strengthened */ { return _Tuple_transform( - [](auto& _Itr) _STATIC_CALL_OPERATOR noexcept(noexcept(*_Itr)) -> decltype(auto) { return *_Itr; }, + [](auto& _Itr) _STATIC_LAMBDA noexcept(noexcept(*_Itr)) -> decltype(auto) { return *_Itr; }, _Current); } - constexpr _Iterator& operator++() noexcept( - noexcept(_Tuple_for_each([](auto& _Itr) _STATIC_CALL_OPERATOR noexcept(noexcept(++_Itr)) { ++_Itr; }, - _Current))) /* strengthened */ { - _Tuple_for_each([](auto& _Itr) _STATIC_CALL_OPERATOR noexcept(noexcept(++_Itr)) { ++_Itr; }, _Current); + constexpr _Iterator& operator++() noexcept(noexcept(_Tuple_for_each( + [](auto& _Itr) _STATIC_LAMBDA noexcept(noexcept(++_Itr)) { ++_Itr; }, _Current))) /* strengthened */ { + _Tuple_for_each([](auto& _Itr) _STATIC_LAMBDA noexcept(noexcept(++_Itr)) { ++_Itr; }, _Current); return *this; } @@ -7215,10 +7214,10 @@ namespace ranges { } constexpr _Iterator& operator--() noexcept(noexcept(_Tuple_for_each( - [](auto& _Itr) _STATIC_CALL_OPERATOR noexcept(noexcept(--_Itr)) { --_Itr; }, _Current))) // strengthened + [](auto& _Itr) _STATIC_LAMBDA noexcept(noexcept(--_Itr)) { --_Itr; }, _Current))) // strengthened requires _All_bidirectional<_IsConst, _ViewTypes...> { - _Tuple_for_each([](auto& _Itr) _STATIC_CALL_OPERATOR noexcept(noexcept(--_Itr)) { --_Itr; }, _Current); + _Tuple_for_each([](auto& _Itr) _STATIC_LAMBDA noexcept(noexcept(--_Itr)) { --_Itr; }, _Current); return *this; } @@ -7439,7 +7438,7 @@ namespace ranges { } } - static constexpr auto _Size_closure = [](auto... _Sizes) _STATIC_CALL_OPERATOR noexcept { + static constexpr auto _Size_closure = [](auto... _Sizes) _STATIC_LAMBDA noexcept { using _Common_unsigned_type = _Make_unsigned_like_t>; return (_RANGES min)({static_cast<_Common_unsigned_type>(_Sizes)...}); }; @@ -8029,7 +8028,7 @@ namespace ranges { _NODISCARD constexpr auto operator*() const { return _RANGES _Tuple_transform( - [](auto& _It) _STATIC_CALL_OPERATOR -> decltype(auto) { return *_It; }, _Current); + [](auto& _It) _STATIC_LAMBDA -> decltype(auto) { return *_It; }, _Current); } constexpr _Iterator& operator++() noexcept(noexcept(++_Current.front())) /* strengthened */ { @@ -8956,7 +8955,7 @@ namespace ranges { _NODISCARD constexpr auto operator*() const { return _RANGES _Tuple_transform( - [](auto& _It) _STATIC_CALL_OPERATOR -> decltype(auto) { return *_It; }, _Current); + [](auto& _It) _STATIC_LAMBDA -> decltype(auto) { return *_It; }, _Current); } constexpr _Iterator& operator++() { diff --git a/stl/inc/xstring b/stl/inc/xstring index e18772035bf..02d8fc784ee 100644 --- a/stl/inc/xstring +++ b/stl/inc/xstring @@ -1503,7 +1503,7 @@ public: return _Reallocate_grow_by( _Count, [](_Elem* const _New_ptr, const _Elem* const _Old_ptr, const size_type _Old_size, const _Elem* const _Ptr, - const size_type _Count) _STATIC_CALL_OPERATOR { + const size_type _Count) _STATIC_LAMBDA { _Traits::copy(_New_ptr, _Old_ptr, _Old_size); _Traits::copy(_New_ptr + _Old_size, _Ptr, _Count); _Traits::assign(_New_ptr[_Old_size + _Count], _Elem()); @@ -1530,7 +1530,7 @@ public: return _Reallocate_grow_by( _Count, [](_Elem* const _New_ptr, const _Elem* const _Old_ptr, const size_type _Old_size, const size_type _Count, - const _Elem _Ch) _STATIC_CALL_OPERATOR { + const _Elem _Ch) _STATIC_LAMBDA { _Traits::copy(_New_ptr, _Old_ptr, _Old_size); _Traits::assign(_New_ptr + _Old_size, _Count, _Ch); _Traits::assign(_New_ptr[_Old_size + _Count], _Elem()); @@ -1608,7 +1608,7 @@ public: return _Reallocate_for( _Count, - [](_Elem* const _New_ptr, const size_type _Count, const _Elem* const _Ptr) _STATIC_CALL_OPERATOR { + [](_Elem* const _New_ptr, const size_type _Count, const _Elem* const _Ptr) _STATIC_LAMBDA { _Traits::copy(_New_ptr, _Ptr, _Count); _Traits::assign(_New_ptr[_Count], _Elem()); }, @@ -1632,7 +1632,7 @@ public: return _Reallocate_for( _Count, - [](_Elem* const _New_ptr, const size_type _Count, const _Elem _Ch) _STATIC_CALL_OPERATOR { + [](_Elem* const _New_ptr, const size_type _Count, const _Elem _Ch) _STATIC_LAMBDA { _Traits::assign(_New_ptr, _Count, _Ch); _Traits::assign(_New_ptr[_Count], _Elem()); }, @@ -1748,7 +1748,7 @@ public: return _Reallocate_grow_by( _Count, [](_Elem* const _New_ptr, const _Elem* const _Old_ptr, const size_type _Old_size, const size_type _Off, - const _Elem* const _Ptr, const size_type _Count) _STATIC_CALL_OPERATOR { + const _Elem* const _Ptr, const size_type _Count) _STATIC_LAMBDA { _Traits::copy(_New_ptr, _Old_ptr, _Off); _Traits::copy(_New_ptr + _Off, _Ptr, _Count); _Traits::copy(_New_ptr + _Off + _Count, _Old_ptr + _Off, _Old_size - _Off + 1); @@ -1779,7 +1779,7 @@ public: return _Reallocate_grow_by( _Count, [](_Elem* const _New_ptr, const _Elem* const _Old_ptr, const size_type _Old_size, const size_type _Off, - const size_type _Count, const _Elem _Ch) _STATIC_CALL_OPERATOR { + const size_type _Count, const _Elem _Ch) _STATIC_LAMBDA { _Traits::copy(_New_ptr, _Old_ptr, _Off); _Traits::assign(_New_ptr + _Off, _Count, _Ch); _Traits::copy(_New_ptr + _Off + _Count, _Old_ptr + _Off, _Old_size - _Off + 1); @@ -1991,7 +1991,7 @@ public: return _Reallocate_grow_by( _Growth, [](_Elem* const _New_ptr, const _Elem* const _Old_ptr, const size_type _Old_size, const size_type _Off, - const size_type _Nx, const _Elem* const _Ptr, const size_type _Count) _STATIC_CALL_OPERATOR { + const size_type _Nx, const _Elem* const _Ptr, const size_type _Count) _STATIC_LAMBDA { _Traits::copy(_New_ptr, _Old_ptr, _Off); _Traits::copy(_New_ptr + _Off, _Ptr, _Count); _Traits::copy(_New_ptr + _Off + _Count, _Old_ptr + _Off + _Nx, _Old_size - _Nx - _Off + 1); @@ -2031,7 +2031,7 @@ public: return _Reallocate_grow_by( _Count - _Nx, [](_Elem* const _New_ptr, const _Elem* const _Old_ptr, const size_type _Old_size, const size_type _Off, - const size_type _Nx, const size_type _Count, const _Elem _Ch) _STATIC_CALL_OPERATOR { + const size_type _Nx, const size_type _Count, const _Elem _Ch) _STATIC_LAMBDA { _Traits::copy(_New_ptr, _Old_ptr, _Off); _Traits::assign(_New_ptr + _Off, _Count, _Ch); _Traits::copy(_New_ptr + _Off + _Count, _Old_ptr + _Off + _Nx, _Old_size - _Nx - _Off + 1); @@ -2281,7 +2281,7 @@ public: _Reallocate_grow_by( 1, [](_Elem* const _New_ptr, const _Elem* const _Old_ptr, const size_type _Old_size, const _Elem _Ch) - _STATIC_CALL_OPERATOR { + _STATIC_LAMBDA { _Traits::copy(_New_ptr, _Old_ptr, _Old_size); _Traits::assign(_New_ptr[_Old_size], _Ch); _Traits::assign(_New_ptr[_Old_size + 1], _Elem()); @@ -2381,7 +2381,7 @@ public: if (_Mypair._Myval2._Myres < _New_size) { _Reallocate_grow_by(_New_size - _Mypair._Myval2._Mysize, [](_Elem* const _New_ptr, const _Elem* const _Old_ptr, const size_type _Old_size) - _STATIC_CALL_OPERATOR { _Traits::copy(_New_ptr, _Old_ptr, _Old_size + 1); }); + _STATIC_LAMBDA { _Traits::copy(_New_ptr, _Old_ptr, _Old_size + 1); }); } else { _ASAN_STRING_MODIFY(*this, _Mypair._Myval2._Mysize, _New_size); _Mypair._Myval2._Mysize = _New_size; @@ -2419,7 +2419,7 @@ public: const size_type _Old_size = _Mypair._Myval2._Mysize; _Reallocate_grow_by(_Newcap - _Old_size, [](_Elem* const _New_ptr, const _Elem* const _Old_ptr, const size_type _Old_size) - _STATIC_CALL_OPERATOR { _Traits::copy(_New_ptr, _Old_ptr, _Old_size + 1); }); + _STATIC_LAMBDA { _Traits::copy(_New_ptr, _Old_ptr, _Old_size + 1); }); // `_Reallocate_grow_by` calls `_ASAN_STRING_CREATE` assuming that the string // has size (initialized memory) equal to its new capacity (allocated memory). @@ -2447,7 +2447,7 @@ public: const size_type _Old_size = _Mypair._Myval2._Mysize; _Reallocate_grow_by(_Newcap - _Old_size, [](_Elem* const _New_ptr, const _Elem* const _Old_ptr, const size_type _Old_size) - _STATIC_CALL_OPERATOR { _Traits::copy(_New_ptr, _Old_ptr, _Old_size + 1); }); + _STATIC_LAMBDA { _Traits::copy(_New_ptr, _Old_ptr, _Old_size + 1); }); // `_Reallocate_grow_by` calls `_ASAN_STRING_CREATE` assuming that the string // has size (initialized memory) equal to its new capacity (allocated memory). diff --git a/stl/inc/xutility b/stl/inc/xutility index 0c5c942a29d..0d5b9872e48 100644 --- a/stl/inc/xutility +++ b/stl/inc/xutility @@ -6179,12 +6179,12 @@ namespace ranges { template _Se, class _Ty, class _Pj = identity> requires indirect_binary_predicate, const _Ty*> _NODISCARD constexpr _It _Find_unchecked(_It _First, const _Se _Last, const _Ty& _Val, _Pj _Proj = {}) { - constexpr bool _Elements_are_1_or_2_bytes = sizeof(_Iter_value_t<_It>) <= 2; - constexpr bool _Is_sized = sized_sentinel_for<_Se, _It>; + constexpr bool _Elements_are_1_byte = sizeof(_Iter_value_t<_It>) == 1; + constexpr bool _Is_sized = sized_sentinel_for<_Se, _It>; if constexpr (_Vector_alg_in_find_is_safe<_It, _Ty> - && (_Elements_are_1_or_2_bytes ? _Is_sized || same_as<_Se, unreachable_sentinel_t> - : _Is_sized && _USE_STD_VECTOR_ALGORITHMS) + && (_Elements_are_1_byte ? _Is_sized || same_as<_Se, unreachable_sentinel_t> + : _Is_sized && _USE_STD_VECTOR_ALGORITHMS) && same_as<_Pj, identity>) { if (!_STD is_constant_evaluated()) { if (!_STD _Could_compare_equal_to_value_type<_It>(_Val)) { @@ -6202,13 +6202,13 @@ namespace ranges { _Ptr_t _Result; #if _USE_STD_VECTOR_ALGORITHMS if constexpr (_Is_sized) { - // When _Is_sized && _Elements_are_1_or_2_bytes, prefer this over memchr()/wmemchr() for performance + // When _Is_sized && _Elements_are_1_byte, prefer this over memchr() for performance const auto _Last_ptr = _First_ptr + (_Last - _First); _Result = _STD _Find_vectorized(_First_ptr, _Last_ptr, _Val); } else #endif // ^^^ _USE_STD_VECTOR_ALGORITHMS ^^^ { - _STL_INTERNAL_STATIC_ASSERT(_Elements_are_1_or_2_bytes); + _STL_INTERNAL_STATIC_ASSERT(_Elements_are_1_byte); size_t _Count; if constexpr (_Is_sized) { _Count = static_cast(_Last - _First); @@ -6216,14 +6216,11 @@ namespace ranges { _Count = SIZE_MAX; } - if constexpr (sizeof(_Iter_value_t<_It>) == 1) { - _Result = - static_cast<_Ptr_t>(_CSTD memchr(_First_ptr, static_cast(_Val), _Count)); - } else { - _STL_INTERNAL_STATIC_ASSERT(sizeof(_Iter_value_t<_It>) == 2); - _Result = reinterpret_cast<_Ptr_t>(const_cast(_CSTD wmemchr( - reinterpret_cast(_First_ptr), static_cast(_Val), _Count))); - } + // C23 7.27.5.2 "The memchr generic function"/2 says "The implementation shall behave as if + // it reads the characters sequentially and stops as soon as a matching character is found." + // C23 7.32.4.6.9 "The wmemchr generic function"/2 lacks such wording, + // so we don't use wmemchr(), avoiding issues with unreachable_sentinel_t. + _Result = static_cast<_Ptr_t>(_CSTD memchr(_First_ptr, static_cast(_Val), _Count)); if constexpr (_Is_sized) { if (_Result == nullptr) { diff --git a/stl/inc/yvals_core.h b/stl/inc/yvals_core.h index 2bd67b707b9..9be20813bdd 100644 --- a/stl/inc/yvals_core.h +++ b/stl/inc/yvals_core.h @@ -802,6 +802,8 @@ // copy/move constructors and copy/move assignment operators are not trivial (/Wall) // warning C5246: 'member': the initialization of a subobject should be wrapped in braces (/Wall) // warning C5278: adding a specialization for 'type trait' has undefined behavior +// warning C5280: a static operator '()' requires at least '/std:c++23preview' +// warning C5281: a static lambda requires at least '/std:c++23preview' // warning C6294: Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed #ifndef _STL_DISABLED_WARNINGS @@ -809,7 +811,8 @@ #define _STL_DISABLED_WARNINGS \ 4180 4324 4412 4455 4494 4514 4574 4582 4583 4587 \ 4588 4619 4623 4625 4626 4643 4648 4702 4793 4820 \ - 4868 4988 5026 5027 5045 5220 5246 5278 6294 \ + 4868 4988 5026 5027 5045 5220 5246 5278 5280 5281 \ + 6294 \ _STL_DISABLED_WARNING_C4577 \ _STL_DISABLED_WARNING_C4984 \ _STL_DISABLED_WARNING_C5053 \ @@ -820,6 +823,7 @@ // warning: constexpr if is a C++17 extension [-Wc++17-extensions] // warning: explicit(bool) is a C++20 extension [-Wc++20-extensions] // warning: declaring overloaded 'operator()' as 'static' is a C++23 extension [-Wc++23-extensions] +// warning: static lambdas are a C++23 extension [-Wc++23-extensions] // warning: ignoring __declspec(allocator) because the function return type '%s' is not a pointer or reference type // [-Wignored-attributes] // warning: '#pragma float_control' is not supported on this target - ignored [-Wignored-pragmas] @@ -2010,13 +2014,23 @@ compiler option, or define _ALLOW_RTCc_IN_STL to suppress this error. #define _STL_INTERNAL_STATIC_ASSERT(...) #endif // ^^^ !defined(_ENABLE_STL_INTERNAL_CHECK) ^^^ -#ifdef __cpp_static_call_operator +#ifdef __CUDACC__ // TRANSITION, CUDA 12.4 doesn't have downlevel support for static call operators +#define _STATIC_CALL_OPERATOR +#define _CONST_CALL_OPERATOR const +#define _STATIC_LAMBDA +#elif defined(__clang__) || defined(__EDG__) // no workaround #define _STATIC_CALL_OPERATOR static #define _CONST_CALL_OPERATOR -#else // ^^^ defined(__cpp_static_call_operator) / !defined(__cpp_static_call_operator) vvv +#define _STATIC_LAMBDA static +#elif _MSC_VER < 1944 // TRANSITION, internal toolset needs to be updated to VS 2022 17.14 Preview 1 #define _STATIC_CALL_OPERATOR #define _CONST_CALL_OPERATOR const -#endif // ^^^ !defined(__cpp_static_call_operator) ^^^ +#define _STATIC_LAMBDA +#else // TRANSITION, VSO-2383148, fixed in VS 2022 17.14 Preview 3 +#define _STATIC_CALL_OPERATOR static +#define _CONST_CALL_OPERATOR +#define _STATIC_LAMBDA +#endif // ^^^ workaround ^^^ #ifdef __CUDACC__ // TRANSITION, CUDA 12.4 doesn't recognize MSVC __restrict; CUDA __restrict__ is not usable in C++ #define _RESTRICT diff --git a/stl/src/vector_algorithms.cpp b/stl/src/vector_algorithms.cpp index bbdd8ff2094..41c2daac2f6 100644 --- a/stl/src/vector_algorithms.cpp +++ b/stl/src/vector_algorithms.cpp @@ -4481,12 +4481,18 @@ extern "C" { // TRANSITION, ABI: preserved for binary compatibility const void* __stdcall __std_find_trivial_unsized_1(const void* const _First, const uint8_t _Val) noexcept { + // C23 7.27.5.2 "The memchr generic function"/2 says "The implementation shall behave as if + // it reads the characters sequentially and stops as soon as a matching character is found." return memchr(_First, _Val, SIZE_MAX); } // TRANSITION, ABI: preserved for binary compatibility const void* __stdcall __std_find_trivial_unsized_2(const void* const _First, const uint16_t _Val) noexcept { - return wmemchr(static_cast(_First), static_cast(_Val), SIZE_MAX); + // C23 7.27.5.2 "The memchr generic function"/2 says "The implementation shall behave as if + // it reads the characters sequentially and stops as soon as a matching character is found." + // C23 7.32.4.6.9 "The wmemchr generic function"/2 lacks such wording, + // so we don't use wmemchr(), avoiding issues with unreachable_sentinel_t. + return __std_find_trivial_unsized_impl(_First, _Val); } // TRANSITION, ABI: preserved for binary compatibility diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index 3fd6165a3c6..d3359a1b79c 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -324,13 +324,8 @@ std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.pass.cpp FAIL # *** MISSING COMPILER FEATURES *** -# P1169R4 static operator() -std/ranges/range.adaptors/range.adaptor.object/range_adaptor_closure.pass.cpp:0 FAIL -std/ranges/range.adaptors/range.adaptor.object/range_adaptor_closure.pass.cpp:1 FAIL -std/thread/futures/futures.task/futures.task.members/ctad.static.compile.pass.cpp:0 FAIL -std/thread/futures/futures.task/futures.task.members/ctad.static.compile.pass.cpp:1 FAIL -std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/ctad.static.compile.pass.cpp:0 FAIL -std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/ctad.static.compile.pass.cpp:1 FAIL + +# None! # *** MISSING LWG ISSUE RESOLUTIONS *** @@ -428,35 +423,6 @@ std/algorithms/alg.modifying.operations/alg.move/move.pass.cpp:1 FAIL std/language.support/support.rtti/type.info/type_info.equal.pass.cpp:0 FAIL std/language.support/support.rtti/type.info/type_info.equal.pass.cpp:1 FAIL -# DevCom-10808176 VSO-2319111 MSVC doesn't properly destroy a loop variable in constant evaluation -# Fixed in VS 2022 17.14 Preview 1. -std/algorithms/alg.nonmodifying/alg.find.last/ranges.find_last.pass.cpp:0 FAIL -std/algorithms/alg.nonmodifying/alg.find.last/ranges.find_last.pass.cpp:1 FAIL -std/containers/sequences/vector.bool/construct_iter_iter.pass.cpp:0 FAIL -std/containers/sequences/vector.bool/construct_iter_iter.pass.cpp:1 FAIL -std/containers/sequences/vector.bool/construct_iter_iter_alloc.pass.cpp:0 FAIL -std/containers/sequences/vector.bool/construct_iter_iter_alloc.pass.cpp:1 FAIL -std/containers/sequences/vector.bool/construct_size.pass.cpp:0 FAIL -std/containers/sequences/vector.bool/construct_size.pass.cpp:1 FAIL -std/containers/sequences/vector.bool/construct_size_value.pass.cpp:0 FAIL -std/containers/sequences/vector.bool/construct_size_value.pass.cpp:1 FAIL -std/containers/sequences/vector.bool/construct_size_value_alloc.pass.cpp:0 FAIL -std/containers/sequences/vector.bool/construct_size_value_alloc.pass.cpp:1 FAIL -std/containers/sequences/vector/reverse_iterators.pass.cpp:0 FAIL -std/containers/sequences/vector/reverse_iterators.pass.cpp:1 FAIL -std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp:0 FAIL -std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp:1 FAIL -std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp:0 FAIL -std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp:1 FAIL -std/containers/sequences/vector/vector.cons/construct_size.pass.cpp:0 FAIL -std/containers/sequences/vector/vector.cons/construct_size.pass.cpp:1 FAIL -std/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp:0 FAIL -std/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp:1 FAIL -std/containers/sequences/vector/vector.cons/construct_size_value_alloc.pass.cpp:0 FAIL -std/containers/sequences/vector/vector.cons/construct_size_value_alloc.pass.cpp:1 FAIL -std/containers/views/mdspan/mdspan/index_operator.pass.cpp:0 FAIL -std/containers/views/mdspan/mdspan/index_operator.pass.cpp:1 FAIL - # VSO-2338829 constexpr error "subtracting pointers to elements of different arrays" in _String_const_iterator::_Verify_offset() std/strings/basic.string/string.modifiers/string_erase/iter.pass.cpp:0 FAIL std/strings/basic.string/string.modifiers/string_erase/iter.pass.cpp:1 FAIL @@ -587,11 +553,8 @@ std/input.output/syncstream/syncbuf/syncstream.syncbuf.members/emit.pass.cpp FAI # *** VCRUNTIME BUGS *** -# DevCom-10373274 VSO-1824997 "vcruntime nothrow array operator new falls back on the wrong function" -# This passes for the :1 (ASan) configuration, surprisingly. -# Fixed in VS 2022 17.14 Preview 1. -std/language.support/support.dynamic/new.delete/new.delete.array/new.size_nothrow.replace.indirect.pass.cpp:0 FAIL -std/language.support/support.dynamic/new.delete/new.delete.array/new.size_nothrow.replace.indirect.pass.cpp:2 FAIL + +# None! # *** CRT BUGS *** @@ -996,10 +959,12 @@ std/containers/sequences/vector/vector.modifiers/destroy_elements.pass.cpp FAIL std/containers/sequences/vector/vector.modifiers/insert_range.pass.cpp FAIL std/strings/basic.string/string.modifiers/string_replace/replace_with_range.pass.cpp FAIL std/utilities/charconv/charconv.to.chars/integral.pass.cpp FAIL -std/utilities/template.bitset/bitset.members/left_shift_eq.pass.cpp FAIL -std/utilities/template.bitset/bitset.members/op_and_eq.pass.cpp FAIL -std/utilities/template.bitset/bitset.members/op_or_eq.pass.cpp FAIL -std/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp FAIL + +# Not analyzed, failing due to constexpr step limits. SKIPPED because they occasionally pass in certain configurations. +std/utilities/template.bitset/bitset.members/left_shift_eq.pass.cpp SKIPPED +std/utilities/template.bitset/bitset.members/op_and_eq.pass.cpp SKIPPED +std/utilities/template.bitset/bitset.members/op_or_eq.pass.cpp SKIPPED +std/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp SKIPPED # Not analyzed. In debug mode, looks like a proxy object unexpectedly exhausts an 80-byte buffer. # In release mode, fails in a later assertion that appears to be testing libc++-specific behavior. @@ -1102,6 +1067,10 @@ std/ranges/range.adaptors/range.join/range.join.iterator/iter.swap.pass.cpp:1 FA 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 + # Not analyzed. SKIPPED because this is x86-specific, fatal error C1060: compiler is out of heap space std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.iterator.pass.cpp:0 SKIPPED std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.iterator.pass.cpp:1 SKIPPED @@ -1295,6 +1264,10 @@ std/containers/sequences/vector/vector.capacity/shrink_to_fit_exceptions.pass.cp std/depr/depr.c.headers/stdalign_h.compile.pass.cpp:0 FAIL std/depr/depr.c.headers/stdalign_h.compile.pass.cpp:1 FAIL +# Not analyzed. Probably an MSVC compiler bug, as it rejects `n | negate | negate` while Clang accepts. +std/ranges/range.adaptors/range.adaptor.object/range_adaptor_closure.pass.cpp:0 FAIL +std/ranges/range.adaptors/range.adaptor.object/range_adaptor_closure.pass.cpp:1 FAIL + # *** XFAILS WHICH PASS *** # These tests contain `// XFAIL: msvc` comments, which accurately describe runtime failures for x86 and x64. @@ -1335,6 +1308,7 @@ std/language.support/support.exception/propagation/current_exception.pass.cpp:2 # to silence warnings, but the MSVC-internal test harness doesn't yet parse ADDITIONAL_COMPILE_FLAGS. std/algorithms/alg.modifying.operations/alg.replace/ranges.replace.pass.cpp:9 SKIPPED std/algorithms/alg.nonmodifying/alg.equal/equal.pass.cpp:9 SKIPPED +std/algorithms/alg.nonmodifying/alg.find.last/ranges.find_last.pass.cpp:9 SKIPPED std/algorithms/alg.nonmodifying/alg.find/find.pass.cpp:9 SKIPPED std/algorithms/alg.nonmodifying/alg.find/ranges.find.pass.cpp:9 SKIPPED std/algorithms/alg.nonmodifying/alg.fold/left_folds.pass.cpp:9 SKIPPED @@ -1382,8 +1356,9 @@ std/containers/sequences/vector/vector.modifiers/assert.push_back.invalidation.p # Listing these on separate lines would allow magic_comments.txt to recognize it. std/containers/sequences/array/assert.iterators.pass.cpp:9 SKIPPED -# These tests emit C5321, which warns when the resolution to core issue 1656 affects a u8 string literal. +# 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. +# 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 diff --git a/tests/std/tests/P1169R4_static_call_operator/test.compile.pass.cpp b/tests/std/tests/P1169R4_static_call_operator/test.compile.pass.cpp index ecd82ea1de6..cbc7e268f91 100644 --- a/tests/std/tests/P1169R4_static_call_operator/test.compile.pass.cpp +++ b/tests/std/tests/P1169R4_static_call_operator/test.compile.pass.cpp @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifdef __cpp_static_call_operator - #include #include #include @@ -51,5 +49,3 @@ void all_tests() { test_ctad(); test_ctad(); } - -#endif // ^^^ defined(__cpp_static_call_operator) ^^^ diff --git a/tools/scripts/print_failures.py b/tools/scripts/print_failures.py index 8a09e19f3db..801eb5ffd32 100644 --- a/tools/scripts/print_failures.py +++ b/tools/scripts/print_failures.py @@ -21,7 +21,10 @@ for testcase_elem in test_xml.getElementsByTagName("testcase"): for failure_elem in testcase_elem.getElementsByTagName("failure"): print(f"name: {testcase_elem.getAttribute('classname')}") - print(f"output: {failure_elem.firstChild.data}") + if failure_elem.firstChild is None: + print("No output, possibly because this was an XPASS.") + else: + print(f"output: {failure_elem.firstChild.data}") print("==================================================") else: test_log = json.load(file)