Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ cmake_minimum_required(VERSION 3.31.0)
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
project(msvc_standard_libraries LANGUAGES CXX)

if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.44.35207.1")
message(FATAL_ERROR "The STL must be built with VS 2022 17.14 Preview 7 or later.")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.44.35209")
message(FATAL_ERROR "The STL must be built with VS 2022 17.14.5 Preview 1 or later.")
endif()

include(CheckCXXSourceCompiles)
check_cxx_source_compiles([=[
#include <sdkddkver.h>
static_assert(WDK_NTDDI_VERSION >= NTDDI_WIN10_NI, "Inspecting WDK_NTDDI_VERSION, the Windows SDK version.");
static_assert(WDK_NTDDI_VERSION >= NTDDI_WIN11_GE, "Inspecting WDK_NTDDI_VERSION, the Windows SDK version.");
int main() {}
]=] WINDOWS_SDK_VERSION_CHECK)

if(NOT WINDOWS_SDK_VERSION_CHECK)
message(FATAL_ERROR "The STL must be built with the Windows 11 SDK (10.0.22621.0) or later. Make sure it's available by selecting it in the Individual Components tab of the VS Installer.")
message(FATAL_ERROR "The STL must be built with the Windows 11 SDK (10.0.26100.3916) or later. Make sure it's available by selecting it in the Individual Components tab of the VS Installer.")
endif()

if(NOT DEFINED VCLIBS_TARGET_ARCHITECTURE)
Expand Down Expand Up @@ -96,9 +96,12 @@ set(TOOLSET_LIB "${TOOLSET_ROOT_DIR}/lib/${VCLIBS_X86_OR_X64}")
set(STL_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/out/lib/${VCLIBS_I386_OR_AMD64}")
set(STL_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/out/lib/${VCLIBS_I386_OR_AMD64}")
set(STL_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/out/bin/${VCLIBS_I386_OR_AMD64}")

# TRANSITION, update internal crt-common.settings.targets, atlmfc.settings.targets, and fe-components.settings.targets
# from NTDDI_WIN10_NI to NTDDI_WIN11_GE when the internal WinSDK is updated.
add_compile_definitions(
_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH WIN32_LEAN_AND_MEAN STRICT _CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS
_WIN32_WINNT=0x0A00 NTDDI_VERSION=NTDDI_WIN10_NI)
_WIN32_WINNT=0x0A00 NTDDI_VERSION=NTDDI_WIN11_GE)

if(STL_USE_ANALYZE)
# TRANSITION, Windows SDK 10.0.22621.0 emits
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ 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 7 or later.
* Select "Windows 11 SDK (10.0.22621.0)" in the VS Installer.
1. Install Visual Studio 2022 17.14.5 Preview 1 or later.
* Select "Windows 11 SDK (10.0.26100.3916)" 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.
* Select "MSVC v143 - VS 2022 C++ ARM build tools (Latest)" in the VS Installer
Expand All @@ -160,8 +160,8 @@ 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 7 or later.
* Select "Windows 11 SDK (10.0.22621.0)" in the VS Installer.
1. Install Visual Studio 2022 17.14.5 Preview 1 or later.
* Select "Windows 11 SDK (10.0.26100.3916)" 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.
* Select "MSVC v143 - VS 2022 C++ ARM build tools (Latest)" in the VS Installer
Expand Down
2 changes: 1 addition & 1 deletion azure-devops/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

variables:
- name: poolName
value: 'StlBuild-2025-05-16T0735-Pool'
value: 'StlBuild-2025-06-10T1243-Pool'
readonly: true
- name: poolDemands
value: 'EnableSpotVM -equals false'
Expand Down
4 changes: 2 additions & 2 deletions azure-devops/provision-image.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ $VisualStudioWorkloads = @(
'Microsoft.VisualStudio.Component.VC.Tools.ARM64',
'Microsoft.VisualStudio.Component.VC.Tools.ARM64EC',
'Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
'Microsoft.VisualStudio.Component.Windows11SDK.22621'
'Microsoft.VisualStudio.Component.Windows11SDK.26100'
)

$VisualStudioUrl = 'https://aka.ms/vs/17/pre/vs_enterprise.exe'
Expand All @@ -43,7 +43,7 @@ foreach ($workload in $VisualStudioWorkloads) {
$PowerShellUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.5.1/PowerShell-7.5.1-win-x64.msi'
$PowerShellArgs = @('/quiet', '/norestart')

$PythonUrl = 'https://www.python.org/ftp/python/3.13.3/python-3.13.3-amd64.exe'
$PythonUrl = 'https://www.python.org/ftp/python/3.13.4/python-3.13.4-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'
Expand Down
27 changes: 14 additions & 13 deletions stl/inc/__msvc_ranges_tuple_formatter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,19 +239,20 @@ class basic_format_arg {
void(__cdecl* _Format)(basic_format_parse_context<_CharType>& _Parse_ctx, _Context& _Format_ctx, const void*);

template <class _Ty>
explicit handle(_Ty& _Val) noexcept
: _Ptr(_STD addressof(_Val)), _Format([](basic_format_parse_context<_CharType>& _Parse_ctx,
_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, _Context>, const _Ty, _Ty>;
_STL_INTERNAL_STATIC_ASSERT(_Formattable_with<_Tq, _Context>);

typename _Context::template formatter_type<_Td> _Formatter;
_Parse_ctx.advance_to(_Formatter.parse(_Parse_ctx));
_Format_ctx.advance_to(
_Formatter.format(*const_cast<_Tq*>(static_cast<const _Td*>(_Ptr)), _Format_ctx));
}) {}
static void __cdecl _Handle_format(
basic_format_parse_context<_CharType>& _Parse_ctx, _Context& _Format_ctx, const void* _Ptr) {
using _Td = remove_const_t<_Ty>;
// doesn't drop const-qualifier per an unnumbered LWG issue
using _Tq = conditional_t<_Formattable_with<const _Ty, _Context>, const _Ty, _Ty>;
_STL_INTERNAL_STATIC_ASSERT(_Formattable_with<_Tq, _Context>);

typename _Context::template formatter_type<_Td> _Formatter;
_Parse_ctx.advance_to(_Formatter.parse(_Parse_ctx));
_Format_ctx.advance_to(_Formatter.format(*const_cast<_Tq*>(static_cast<const _Td*>(_Ptr)), _Format_ctx));
}

template <class _Ty>
explicit handle(_Ty& _Val) noexcept : _Ptr(_STD addressof(_Val)), _Format(_Handle_format<_Ty>) {}

public:
void format(basic_format_parse_context<_CharType>& _Parse_ctx, _Context& _Format_ctx) const {
Expand Down
8 changes: 2 additions & 6 deletions stl/inc/yvals_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -2008,15 +2008,11 @@ compiler option, or define _ALLOW_RTCc_IN_STL to suppress this error.
#define _STATIC_CALL_OPERATOR
#define _CONST_CALL_OPERATOR const
#define _STATIC_LAMBDA
#elif defined(__clang__) || defined(__EDG__) // no workaround
#else // ^^^ workaround / no workaround vvv
#define _STATIC_CALL_OPERATOR static
#define _CONST_CALL_OPERATOR
#define _STATIC_LAMBDA static
#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 ^^^
#endif // ^^^ no workaround ^^^

#ifdef __CUDACC__ // TRANSITION, CUDA 12.4 doesn't recognize MSVC __restrict; CUDA __restrict__ is not usable in C++
#define _RESTRICT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,7 @@ constexpr bool test() {
ASSERT(!is_corresponding_member(&S5::v1, &S6::v2));
ASSERT(!is_corresponding_member(&S5::v2, &S6::v1));
ASSERT(!is_corresponding_member(&S5::v3, &S6::v3));
#ifndef _M_CEE // TRANSITION, VSO-2417635
ASSERT(!is_corresponding_member<NS, NS>(&NS::v1, &NS::w1));
#endif // ^^^ no workaround ^^^
ASSERT(!is_corresponding_member(&S7::f1, &S7::f1));
ASSERT(!is_corresponding_member(static_cast<int S1::*>(nullptr), static_cast<int S2::*>(nullptr)));
ASSERT(!is_corresponding_member(&S1::v1, static_cast<int S2::*>(nullptr)));
Expand Down Expand Up @@ -236,9 +234,7 @@ constexpr bool test() {
ASSERT(is_pointer_interconvertible_with_class(&U::v2));

ASSERT(!is_pointer_interconvertible_with_class<NS>(&NS::a));
#ifndef _M_CEE // TRANSITION, VSO-2417635
ASSERT(!is_pointer_interconvertible_with_class<NS>(&NS::b));
#endif // ^^^ no workaround ^^^
ASSERT(!is_pointer_interconvertible_with_class(&C::f1));
ASSERT(!is_pointer_interconvertible_with_class(static_cast<int A::*>(nullptr)));
}
Expand Down
9 changes: 2 additions & 7 deletions tests/std/tests/P0896R4_P1614R2_comparisons/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,13 +425,8 @@ constexpr void ordering_test_cases() {

derived const some_deriveds[2] = {};
test_strongly_ordered(&some_deriveds[0], &some_deriveds[1]);
#if !defined(__clang__) && !defined(__EDG__) // TRANSITION, VSO-1168721
if (!std::is_constant_evaluated())
#endif // ^^^ workaround ^^^
{
test_strongly_ordered(static_cast<base const*>(&some_deriveds[0]), &some_deriveds[1]);
test_strongly_ordered(&some_deriveds[0], static_cast<base const*>(&some_deriveds[1]));
}
test_strongly_ordered(static_cast<base const*>(&some_deriveds[0]), &some_deriveds[1]);
test_strongly_ordered(&some_deriveds[0], static_cast<base const*>(&some_deriveds[1]));

if (!std::is_constant_evaluated()) {
test_strongly_ordered(&some_ints[0], static_cast<void const*>(&some_ints[1]));
Expand Down
4 changes: 2 additions & 2 deletions tests/std/tests/P1208R6_source_location/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ constexpr void different_constructor_test() {
assert(x.loc.column() == 5);
#endif // ^^^ C1XX ^^^
#if _USE_DETAILED_FUNCTION_NAME_IN_SOURCE_LOCATION
#ifdef __EDG__ // TRANSITION, EDG is changing to match C1XX's output
assert(x.loc.function_name() == THISCALL_OR_CDECL " s::s(int)"sv || x.loc.function_name() == "s::s(int)"sv);
#ifdef __EDG__ // TRANSITION, EDG is changing to almost match C1XX's output
assert(x.loc.function_name() == "__cdecl s::s(int)"sv || x.loc.function_name() == "s::s(int)"sv);
#else // ^^^ workaround / no workaround vvv
assert(x.loc.function_name() == THISCALL_OR_CDECL " s::s(int)"sv);
#endif // ^^^ no workaround ^^^
Expand Down