Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
df08cfc
Cycle locations for ARM64.
StephanTLavavej Feb 17, 2026
73f0a69
Python 3.14.3.
StephanTLavavej Feb 17, 2026
21957ad
CMake 4.2.1.
StephanTLavavej Feb 17, 2026
1d670dc
MSVC Compiler 19.51.36014.
StephanTLavavej Feb 17, 2026
58822ab
README.md: Install "(Preview)" Build Tools.
StephanTLavavej Feb 19, 2026
10deabe
README.md: Update Command Prompt instructions, adding `-vcvars_ver=pr…
StephanTLavavej Feb 19, 2026
f89c66c
provision-image.ps1: Update to Preview components.
StephanTLavavej Feb 19, 2026
9cc1c4f
provision-image.ps1: Patch Launch-VsDevShell.ps1.
StephanTLavavej Feb 19, 2026
6e17472
CMakePresets.json: Set "toolset" with a "value" of "version=preview".
StephanTLavavej Feb 19, 2026
610de9c
Use 10 shards for x64/x86 too.
StephanTLavavej Feb 17, 2026
ef449fb
VSO-2574432 "C1XX incorrectly handles a requires-expression checking …
StephanTLavavej Feb 19, 2026
0a7f286
VSO-1513409 "Bogus `warning C4100: '<_Args_0>': unreferenced formal p…
StephanTLavavej Feb 19, 2026
e613791
EDG 6.8 implemented multidimensional subscript.
StephanTLavavej Feb 17, 2026
0692042
Enable P2674R1 is_implicit_lifetime in C++23 mode for MSVC.
StephanTLavavej Feb 19, 2026
c526174
Enable P2255R2 reference_meows_from_temporary in C++23 mode for MSVC …
StephanTLavavej Feb 19, 2026
6e409bd
MSVC implemented P2448R2 "Relaxing some constexpr restrictions" with …
StephanTLavavej Feb 19, 2026
931a8f6
MSVC fixed a constexpr bug!
StephanTLavavej Feb 19, 2026
0ac9078
Reported LLVM-182390.
StephanTLavavej Feb 19, 2026
08e79b6
Reported LLVM-182392.
StephanTLavavej Feb 19, 2026
80469c7
Reported LLVM-182397.
StephanTLavavej Feb 19, 2026
cb9463b
Template parameters: `_Pc` => `_ParseContext`
StephanTLavavej Feb 20, 2026
7a94b6b
Function parameters: `_Pc` => `_Parse_ctx`
StephanTLavavej Feb 20, 2026
2bfcd9e
Template parameters: `_ParseCtx` => `_ParseContext`
StephanTLavavej Feb 20, 2026
51cf200
Function parameters: `_ParseCtx` => `_Parse_ctx`
StephanTLavavej Feb 20, 2026
9fe4ce0
Function parameters: `_FormatCtx` => `_Format_ctx`
StephanTLavavej Feb 20, 2026
ec5c9cd
Template parameters: `_FmtCtx` => `_FormatContext`
StephanTLavavej Feb 20, 2026
e5b5349
`_Fill_align_and_width_formatter::_Format()` shouldn't be `constexpr`.
StephanTLavavej Feb 20, 2026
75b3487
`_Fill_align_and_width_formatter::_Format()` return type: `auto` => `…
StephanTLavavej Feb 20, 2026
f238912
Update citations: VSO-1236041 => VSO-2744645
StephanTLavavej Feb 20, 2026
75ffc42
Drop `_NODISCARD` on workaround functions to match their callers.
StephanTLavavej Feb 20, 2026
ce586f5
`<format>`: Remove workarounds for declaring and defining member func…
StephanTLavavej Feb 20, 2026
610ea09
libcxx/expected_results.txt: Overhaul the "XFAILS WHICH PASS" section.
StephanTLavavej Feb 20, 2026
51d55d4
Partially enable ARM64 ASan, add test coverage.
StephanTLavavej Nov 2, 2025
fdda15c
New pools.
StephanTLavavej Feb 20, 2026
fdd46bf
Upgrade all "constexpr step limits" tests to SKIPPED.
StephanTLavavej Feb 20, 2026
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
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

cmake_minimum_required(VERSION 4.1.2)
cmake_minimum_required(VERSION 4.2.1)

set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
project(msvc_standard_libraries LANGUAGES CXX)

if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.50.35722")
message(FATAL_ERROR "The STL must be built with MSVC Compiler 19.50.35722 or later.")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.51.36014")
message(FATAL_ERROR "The STL must be built with MSVC Compiler 19.51.36014 or later.")
endif()

include(CheckCXXSourceCompiles)
Expand Down
6 changes: 5 additions & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
"name": "base",
"hidden": true,
"generator": "Ninja",
"binaryDir": "${sourceDir}/out/${presetName}"
"binaryDir": "${sourceDir}/out/${presetName}",
"toolset": {
"strategy": "external",
"value": "version=preview"
}
},
{
"name": "x64",
Expand Down
67 changes: 39 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,13 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem
+ **You must install Insiders for STL development.** *See Note 1 below.*
+ Select the "Desktop development with C++" workload.
+ Select the following components at a minimum:
- "MSVC Build Tools for x64/x86 (Latest)"
- "MSVC Build Tools for x64/x86 (Preview)"
- "C++ CMake tools for Windows"
- "MSVC AddressSanitizer"
- "Windows 11 SDK (10.0.26100)" or later
- "C++ Clang tools for Windows (20.1.8 - x64/x86)"
- *Optional, see Note 2 below:* "MSVC Build Tools for ARM64/ARM64EC (Latest)"
* Install [Python][] 3.14.2 or later.
- *Optional, see Note 2 below:* "MSVC Build Tools for ARM64/ARM64EC (Preview)"
* Install [Python][] 3.14.3 or later.
+ Select "Add python.exe to PATH" if you want to follow the instructions below that invoke `python`.
Otherwise, you should be familiar with alternative methods.

Expand All @@ -170,7 +170,7 @@ For example, `<atomic>` has conditionally compiled code for the `_M_ARM64` and `
4. Use the IDE's dropdown menu to choose the architecture you want to build. We recommend x64 for general development.
5. Build > Build All.

# How To Build With A Native Tools Command Prompt
# How To Build With The Command Prompt

1. Open a command prompt.
2. Change directories to a location where you'd like a clone of this STL repository.
Expand All @@ -180,33 +180,35 @@ If you installed VS to a non-default location, change the `vcvarsall.bat` paths

To build the x64 target (recommended):

1. `"C:\Program Files\Microsoft Visual Studio\18\Insiders\VC\Auxiliary\Build\vcvarsall.bat" x64`
* Or open an "x64 Native Tools Command Prompt for VS 18 Insiders".
2. Change directories to the previously cloned `STL` directory.
3. `cmake --preset x64`
4. `cmake --build --preset x64`
1. `pushd "%ProgramFiles%\Microsoft Visual Studio\18\Insiders\VC\Auxiliary\Build"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not cd/d if there's no goal to popd?

1. `vcvarsall.bat x64 -vcvars_ver=preview`
1. Change directories to the previously cloned `STL` directory.
1. `cmake --preset x64`
1. `cmake --build --preset x64`

To build the x86 target:

1. `"C:\Program Files\Microsoft Visual Studio\18\Insiders\VC\Auxiliary\Build\vcvarsall.bat" x86`
* Or open an "x86 Native Tools Command Prompt for VS 18 Insiders".
2. Change directories to the previously cloned `STL` directory.
3. `cmake --preset x86`
4. `cmake --build --preset x86`
1. `pushd "%ProgramFiles%\Microsoft Visual Studio\18\Insiders\VC\Auxiliary\Build"`
1. `vcvarsall.bat x86 -vcvars_ver=preview`
1. Change directories to the previously cloned `STL` directory.
1. `cmake --preset x86`
1. `cmake --build --preset x86`

To build the ARM64 target:

1. `"C:\Program Files\Microsoft Visual Studio\18\Insiders\VC\Auxiliary\Build\vcvarsall.bat" x64_arm64`
2. Change directories to the previously cloned `STL` directory.
3. `cmake --preset ARM64`
4. `cmake --build --preset ARM64`
1. `pushd "%ProgramFiles%\Microsoft Visual Studio\18\Insiders\VC\Auxiliary\Build"`
1. `vcvarsall.bat x64_arm64 -vcvars_ver=preview`
1. Change directories to the previously cloned `STL` directory.
1. `cmake --preset ARM64`
1. `cmake --build --preset ARM64`

To build the ARM64EC target:

1. `"C:\Program Files\Microsoft Visual Studio\18\Insiders\VC\Auxiliary\Build\vcvarsall.bat" x64_arm64`
2. Change directories to the previously cloned `STL` directory.
3. `cmake --preset ARM64EC`
4. `cmake --build --preset ARM64EC`
1. `pushd "%ProgramFiles%\Microsoft Visual Studio\18\Insiders\VC\Auxiliary\Build"`
1. `vcvarsall.bat x64_arm64 -vcvars_ver=preview`
1. Change directories to the previously cloned `STL` directory.
1. `cmake --preset ARM64EC`
1. `cmake --build --preset ARM64EC`

# How To Consume

Expand All @@ -227,21 +229,30 @@ your .exe would "win" over the versions in System32.
The compiler looks for include directories according to the `INCLUDE` environment variable, and the linker looks for
import library directories according to the `LIB` environment variable, and the Windows loader will (eventually) look
for DLL dependencies according to directories in the `PATH` environment variable.
The build generates a batch script named `set_environment.bat` in the output directory. If you run this script in a VS
Developer Command Prompt, it will insert the proper directories into the `INCLUDE`, `LIB`, and `PATH` environment
The build generates a batch script named `set_environment.bat` in the output directory. If you run this script,
it will insert the proper directories into the `INCLUDE`, `LIB`, and `PATH` environment
variables to ensure that the built headers and libraries are used.

## Complete Example Using x64 DLL Flavor

From an "x64 Native Tools Command Prompt for VS 18 Insiders":

```
C:\Temp>pushd "%ProgramFiles%\Microsoft Visual Studio\18\Insiders\VC\Auxiliary\Build"
C:\Program Files\Microsoft Visual Studio\18\Insiders\VC\Auxiliary\Build>vcvarsall.bat x64 -vcvars_ver=preview
**********************************************************************
** Visual Studio 2026 Developer Command Prompt v18.4.0-insiders
** Copyright (c) 2026 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
C:\Program Files\Microsoft Visual Studio\18\Insiders\VC\Auxiliary\Build>pushd D:\GitHub\STL
D:\GitHub\STL>cmake --preset x64
[...]
-- Build files have been written to: D:/GitHub/STL/out/x64
D:\GitHub\STL>cmake --build --preset x64
[1028/1028] Linking CXX static library out\lib\amd64\libcpmtd0.lib
[762/762] Linking CXX static library out\lib\amd64\libcpmtd0.lib
D:\GitHub\STL>out\x64\set_environment.bat
Expand All @@ -264,7 +275,7 @@ C:\Temp>dumpbin /DEPENDENTS .\example.exe | findstr msvcp
msvcp140d_oss.dll
```

# How To Run The Tests With A Native Tools Command Prompt
# How To Run The Tests

Our tests are currently split across three test suites that are located at `tests\std`, `tests\tr1`, and
`llvm-project\libcxx\test\std`. The test runner `${PROJECT_BINARY_DIR}\tests\utils\stl-lit\stl-lit.py` accepts paths to
Expand Down
26 changes: 20 additions & 6 deletions azure-devops/asan-pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

# Build STL targeting x86 and x64, and run extra ASan testing
# Build STL targeting x64, x86, and arm64, then run extra ASan testing

variables:
- template: config.yml
Expand All @@ -16,8 +16,9 @@ schedules:
- main

stages:
- stage: Build_And_Test_x64
displayName: 'Build and Test x64'
- stage: Test_x64_ASan
displayName: 'Test x64 ASan'
dependsOn: []
pool:
name: ${{ variables.poolName }}
demands: ${{ variables.poolDemands }}
Expand All @@ -30,8 +31,8 @@ stages:
asanBuild: true
testTargets: STL-ASan-CI

- stage: Build_And_Test_x86
displayName: 'Build and Test x86'
- stage: Test_x86_ASan
displayName: 'Test x86 ASan'
dependsOn: []
pool:
name: ${{ variables.poolName }}
Expand All @@ -45,4 +46,17 @@ stages:
asanBuild: true
testTargets: STL-ASan-CI

# no coverage for ARM64
- stage: Test_ARM64_ASan
displayName: 'Test ARM64 ASan'
dependsOn: []
pool:
name: ${{ variables.arm64PoolName }}
demands: ${{ variables.poolDemands }}
jobs:
- template: build-and-test.yml
parameters:
hostArch: arm64
targetArch: arm64
targetPlatform: arm64
asanBuild: true
testTargets: STL-ASan-CI
2 changes: 1 addition & 1 deletion azure-devops/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ parameters:
default: 'STL-CI'
- name: numShards
type: number
default: 8
default: 10
- name: configureTesting
type: boolean
default: true
Expand Down
4 changes: 2 additions & 2 deletions azure-devops/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

variables:
- name: poolName
value: 'Stl-2026-01-13T1248-x64-Pool'
value: 'Stl-2026-02-20T0952-x64-Pool'
readonly: true
- name: arm64PoolName
value: 'Stl-2026-01-13T1248-arm64-Pool'
value: 'Stl-2026-02-20T0952-arm64-Pool'
readonly: true
- name: poolDemands
value: 'EnableSpotVM -equals false'
Expand Down
2 changes: 1 addition & 1 deletion azure-devops/create-1es-hosted-pool.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ if ($Arch -ieq 'x64') {
} else {
# CPP_STL_GitHub has quota for 672 cores (21 VMs) in westcentralus, not currently used.
$AvailableLocations = @('eastus2', 'northeurope') # Locations where CPP_STL_GitHub has quota for 1024 cores (32 VMs).
$AvailableLocationIdx = 4 # Increment for each new pool, to cycle through the available locations.
$AvailableLocationIdx = 5 # Increment for each new pool, to cycle through the available locations.
$Location = $AvailableLocations[$AvailableLocationIdx % $AvailableLocations.Length]
$VMSize = 'Standard_D32ps_v6'
$PoolSize = 32
Expand Down
18 changes: 12 additions & 6 deletions azure-devops/provision-image.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,12 @@ if ($Arch -ieq 'x64') {

$VisualStudioWorkloads = @(
'Microsoft.VisualStudio.Component.VC.ASAN',
'Microsoft.VisualStudio.Component.VC.CLI.Support',
'Microsoft.VisualStudio.Component.VC.CMake.Project',
'Microsoft.VisualStudio.Component.VC.CoreIde',
'Microsoft.VisualStudio.Component.VC.Llvm.Clang',
'Microsoft.VisualStudio.Component.VC.Tools.ARM64',
'Microsoft.VisualStudio.Component.VC.Tools.ARM64EC',
'Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
'Microsoft.VisualStudio.Component.VC.Preview.ARM64',
'Microsoft.VisualStudio.Component.VC.Preview.CLI.Support',
'Microsoft.VisualStudio.Component.VC.Preview.Tools.x86.x64',
'Microsoft.VisualStudio.Component.Windows11SDK.26100'
)

Expand All @@ -67,9 +66,9 @@ $PowerShellArgs = @('/quiet', '/norestart')

# https://www.python.org
if ($Provisioning_x64) {
$PythonUrl = 'https://www.python.org/ftp/python/3.14.2/python-3.14.2-amd64.exe'
$PythonUrl = 'https://www.python.org/ftp/python/3.14.3/python-3.14.3-amd64.exe'
} else {
$PythonUrl = 'https://www.python.org/ftp/python/3.14.2/python-3.14.2-arm64.exe'
$PythonUrl = 'https://www.python.org/ftp/python/3.14.3/python-3.14.3-arm64.exe'
}
$PythonArgs = @('/quiet', 'InstallAllUsers=1', 'PrependPath=1', 'CompileAll=1', 'Include_doc=0')

Expand Down Expand Up @@ -186,6 +185,13 @@ if ($Provisioning_x64) {
EnableNativeNVMe
}

# TRANSITION, patch Launch-VsDevShell.ps1 to pass `-vcvars_ver=preview` before a proper parameter is available.
Write-Host 'Patching Launch-VsDevShell.ps1...'
$launchVsDevShell = 'C:\Program Files\Microsoft Visual Studio\18\Insiders\Common7\Tools\Launch-VsDevShell.ps1'
$paramRegex = 'VsInstanceId = \$instanceId'
$paramSubst = '$&; DevCmdArguments = "-vcvars_ver=preview";'
(Get-Content -Raw $launchVsDevShell) -creplace $paramRegex, $paramSubst | Set-Content -NoNewLine $launchVsDevShell

# Tell create-1es-hosted-pool.ps1 that we succeeded.
Write-Host 'PROVISION_IMAGE_SUCCEEDED'

Expand Down
4 changes: 1 addition & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

# Build STL targeting x86, x64, arm64, arm64ec
# Build STL targeting x64, x86, arm64, arm64ec

variables:
- template: azure-devops/config.yml
Expand Down Expand Up @@ -173,7 +173,6 @@ stages:
hostArch: arm64
targetArch: arm64
targetPlatform: arm64
numShards: 10

- stage: Test_ARM64EC
dependsOn:
Expand All @@ -189,4 +188,3 @@ stages:
hostArch: arm64
targetArch: arm64
targetPlatform: arm64ec
numShards: 10
2 changes: 1 addition & 1 deletion benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

cmake_minimum_required(VERSION 4.1.2)
cmake_minimum_required(VERSION 4.2.1)
project(msvc_standard_libraries_benchmarks LANGUAGES CXX)

if(DEFINED STL_BINARY_DIR)
Expand Down
41 changes: 8 additions & 33 deletions stl/inc/__msvc_formatter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,6 @@ struct formatter {
};

_FMT_P2286_BEGIN
// TRANSITION, VSO-1236041: Avoid declaring and defining member functions in different headers.
template <_Basic_format_arg_type _ArgType, class _CharT, class _Pc>
constexpr _Pc::iterator _Formatter_base_parse(_Dynamic_format_specs<_CharT>& _Specs, _Pc& _ParseCtx);

template <class _Ty, class _CharT, class _FormatContext>
_FormatContext::iterator _Formatter_base_format(
const _Dynamic_format_specs<_CharT>& _Specs, const _Ty& _Val, _FormatContext& _FormatCtx);

template <class _Ty, class _CharT, _Basic_format_arg_type _ArgType>
struct _Formatter_base {
public:
Expand All @@ -165,15 +157,11 @@ struct _Formatter_base {
}
#endif // _HAS_CXX23

template <class _Pc = basic_format_parse_context<_CharT>>
constexpr _Pc::iterator parse(type_identity_t<_Pc&> _ParseCtx) {
return _Formatter_base_parse<_ArgType>(_Specs, _ParseCtx);
}
template <class _ParseContext = basic_format_parse_context<_CharT>>
constexpr _ParseContext::iterator parse(type_identity_t<_ParseContext&> _Parse_ctx); // defined in <format>

template <class _FormatContext>
_FormatContext::iterator format(const _Ty& _Val, _FormatContext& _FormatCtx) const {
return _Formatter_base_format(_Specs, _Val, _FormatCtx);
}
_FormatContext::iterator format(const _Ty& _Val, _FormatContext& _Format_ctx) const; // defined in <format>

private:
_Dynamic_format_specs<_CharT> _Specs;
Expand Down Expand Up @@ -419,30 +407,17 @@ struct _Fill_align_and_width_specs {
_CharT _Fill[4 / sizeof(_CharT)]{' '};
};

// TRANSITION, VSO-1236041: Avoid declaring and defining member functions in different headers.
template <class _CharT, class _Pc>
_NODISCARD constexpr _Pc::iterator _Fill_align_and_width_formatter_parse(
_Fill_align_and_width_specs<_CharT>& _Specs, _Pc& _Parse_ctx);

template <class _CharT, class _FormatContext, class _Func>
_NODISCARD _FormatContext::iterator _Fill_align_and_width_formatter_format(
const _Fill_align_and_width_specs<_CharT>& _Specs, _FormatContext& _Format_ctx, int _Width,
_Fmt_align _Default_align, _Func&& _Fn);

template <class _CharT>
struct _Fill_align_and_width_formatter {
public:
template <class _ParseContext = basic_format_parse_context<_CharT>> // improves throughput, see GH-5003
_NODISCARD constexpr _ParseContext::iterator _Parse(type_identity_t<_ParseContext&> _Parse_ctx) {
return _STD _Fill_align_and_width_formatter_parse(_Specs, _Parse_ctx);
}
_NODISCARD constexpr _ParseContext::iterator _Parse(
type_identity_t<_ParseContext&> _Parse_ctx); // defined in <format>

template <class _FormatContext, class _Func>
_NODISCARD constexpr auto _Format(
_FormatContext& _Format_ctx, const int _Width, _Fmt_align _Default_align, _Func&& _Fn) const {
return _STD _Fill_align_and_width_formatter_format(
_Specs, _Format_ctx, _Width, _Default_align, _STD forward<_Func>(_Fn));
}
_NODISCARD _FormatContext::iterator _Format(_FormatContext& _Format_ctx, const int _Width,
_Fmt_align _Default_align,
_Func&& _Fn) const; // defined in <format>

private:
_Fill_align_and_width_specs<_CharT> _Specs;
Expand Down
Loading