Skip to content

Commit cb2c226

Browse files
committed
Merge branch 'master' into noexcept_reverse_iterator
2 parents 021f80f + 54cce5e commit cb2c226

File tree

376 files changed

+12540
-7631
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

376 files changed

+12540
-7631
lines changed

.clang-format

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) Microsoft Corporation.
22
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
33

4-
# https://releases.llvm.org/10.0.0/tools/clang/docs/ClangFormatStyleOptions.html
4+
# https://releases.llvm.org/11.0.0/tools/clang/docs/ClangFormatStyleOptions.html
55

66
---
77
# Language: Cpp
@@ -14,15 +14,18 @@ AlignAfterOpenBracket: DontAlign
1414
AlignConsecutiveMacros: true
1515
# AlignConsecutiveAssignments: false
1616
AlignConsecutiveAssignments: true
17+
# AlignConsecutiveBitFields: false
1718
# AlignConsecutiveDeclarations: false
1819
# AlignEscapedNewlines: Right
1920
AlignEscapedNewlines: Left
20-
# AlignOperands: true
21+
# AlignOperands: Align
22+
AlignOperands: AlignAfterOperator
2123
# AlignTrailingComments: true
2224
AlignTrailingComments: false
2325
# AllowAllArgumentsOnNextLine: true
2426
# AllowAllConstructorInitializersOnNextLine: true
2527
# AllowAllParametersOfDeclarationOnNextLine: true
28+
# AllowShortEnumsOnASingleLine: true
2629
# AllowShortBlocksOnASingleLine: Never
2730
# AllowShortCaseLabelsOnASingleLine: false
2831
# AllowShortFunctionsOnASingleLine: All
@@ -40,7 +43,7 @@ AlwaysBreakTemplateDeclarations: Yes
4043
# BraceWrapping:
4144
# AfterCaseLabel: false
4245
# AfterClass: false
43-
# AfterControlStatement: false
46+
# AfterControlStatement: Never
4447
# AfterEnum: false
4548
# AfterFunction: false
4649
# AfterNamespace: false
@@ -50,6 +53,8 @@ AlwaysBreakTemplateDeclarations: Yes
5053
# AfterExternBlock: false
5154
# BeforeCatch: false
5255
# BeforeElse: false
56+
# BeforeLambdaBody: false
57+
# BeforeWhile: false
5358
# IndentBraces: false
5459
# SplitEmptyFunction: true
5560
# SplitEmptyRecord: true
@@ -112,12 +117,16 @@ IncludeCategories:
112117
# IncludeIsMainRegex: '(Test)?$'
113118
# IncludeIsMainSourceRegex: ''
114119
# IndentCaseLabels: false
120+
# IndentCaseBlocks: false
121+
IndentCaseBlocks: true
115122
# IndentGotoLabels: true
116123
# IndentPPDirectives: None
124+
# IndentExternBlock: AfterExternBlock
117125
# IndentWidth: 2
118126
IndentWidth: 4
119127
# IndentWrappedFunctionNames: false
120128
IndentWrappedFunctionNames: true
129+
# InsertTrailingCommas: None
121130
# JavaScriptQuotes: Leave
122131
# JavaScriptWrapImports: true
123132
# KeepEmptyLinesAtTheStartOfBlocks: true
@@ -130,6 +139,7 @@ MaxEmptyLinesToKeep: 2
130139
NamespaceIndentation: All
131140
# ObjCBinPackProtocolList: Auto
132141
# ObjCBlockIndentWidth: 2
142+
# ObjCBreakBeforeNestedBlockParam: true
133143
# ObjCSpaceAfterProperty: false
134144
# ObjCSpaceBeforeProtocolList: true
135145
# PenaltyBreakAssignment: 2
@@ -184,4 +194,8 @@ StatementMacros:
184194
# UseCRLF: false
185195
UseCRLF: true
186196
# UseTab: Never
197+
# WhitespaceSensitiveMacros:
198+
# - STRINGIZE
199+
# - PP_STRINGIZE
200+
# - BOOST_PP_STRINGIZE
187201
...

.github/ISSUE_TEMPLATE/cxx20-feature.md renamed to .github/ISSUE_TEMPLATE/cxx23-feature.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
name: cxx20 Feature
2+
name: cxx23 Feature
33
about: For STL maintainers only
44
title: PAPER_NUMBER PAPER_TITLE
5-
labels: cxx20
5+
labels: cxx23
66
assignees: ''
77

88
---
@@ -22,3 +22,8 @@ the https://wg21.link redirector will start working.
2222

2323
Feature-test macro:
2424
`#define MACRO_NAME MACRO_VALUE`
25+
26+
Note: We're still working on finishing C++20. Until we're done
27+
with that (and the compiler implements distinct `/std:c++20` and
28+
`/std:c++latest` options), we won't be able to review PRs for
29+
C++23 features.

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ if (NOT DEFINED CMAKE_TOOLCHAIN_FILE AND EXISTS "${CMAKE_CURRENT_LIST_DIR}/vcpkg
55
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake")
66
endif()
77

8-
cmake_minimum_required(VERSION 3.17)
8+
cmake_minimum_required(VERSION 3.18)
99
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
1010
project(msvc_standard_libraries LANGUAGES CXX)
1111

1212
find_package(Boost REQUIRED)
1313

14-
set(VCLIBS_MIN_BOOST_VERSION 1.73.0)
14+
set(VCLIBS_MIN_BOOST_VERSION 1.74.0)
1515
if("${Boost_VERSION}" VERSION_LESS "${VCLIBS_MIN_BOOST_VERSION}")
1616
message(FATAL_ERROR "Detected Boost version is too old (older than ${VCLIBS_MIN_BOOST_VERSION}).")
1717
endif()

README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ issue. The [bug tag][] and [enhancement tag][] are being populated.
5757

5858
# Goals
5959

60-
We're implementing the latest C++ Working Draft, currently [N4861][], which will eventually become the next C++
60+
We're implementing the latest C++ Working Draft, currently [N4868][], which will eventually become the next C++
6161
International Standard, C++20. The terms Working Draft (WD) and Working Paper (WP) are interchangeable; we often
6262
informally refer to these drafts as "the Standard" while being aware of the difference. (There are other relevant
6363
Standards; for example, supporting `/std:c++14` and `/std:c++17` involves understanding how the C++14 and C++17
@@ -143,30 +143,30 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem
143143
The STL uses boost-math headers to provide P0226R1 Mathematical Special Functions. We recommend using [vcpkg][] to
144144
acquire this dependency.
145145

146-
1. Install Visual Studio 2019 16.8 Preview 3 or later.
146+
1. Install Visual Studio 2019 16.9 Preview 2 or later.
147147
* We recommend selecting "C++ CMake tools for Windows" in the VS Installer.
148148
This will ensure that you're using supported versions of CMake and Ninja.
149-
* Otherwise, install [CMake][] 3.17 or later, and [Ninja][] 1.8.2 or later.
149+
* Otherwise, install [CMake][] 3.18 or later, and [Ninja][] 1.8.2 or later.
150150
2. Open Visual Studio, and choose the "Clone or check out code" option. Enter the URL of this repository,
151151
`https://github.com/microsoft/STL`.
152152
3. Open a terminal in the IDE with `` Ctrl + ` `` (by default) or press on "View" in the top bar, and then "Terminal".
153-
4. In the terminal, invoke `git submodule update --init vcpkg`
153+
4. In the terminal, invoke `git submodule update --init --progress llvm-project vcpkg`
154154
5. In the terminal, invoke `.\vcpkg\bootstrap-vcpkg.bat`
155155
6. In the terminal, invoke `.\vcpkg\vcpkg.exe install boost-math:x86-windows boost-math:x64-windows`
156156
7. Choose the architecture you wish to build in the IDE, and build as you would any other project. All necessary CMake
157157
settings are set by `CMakeSettings.json`.
158158

159159
# How To Build With A Native Tools Command Prompt
160160

161-
1. Install Visual Studio 2019 16.8 Preview 3 or later.
161+
1. Install Visual Studio 2019 16.9 Preview 2 or later.
162162
* We recommend selecting "C++ CMake tools for Windows" in the VS Installer.
163163
This will ensure that you're using supported versions of CMake and Ninja.
164-
* Otherwise, install [CMake][] 3.17 or later, and [Ninja][] 1.8.2 or later.
164+
* Otherwise, install [CMake][] 3.18 or later, and [Ninja][] 1.8.2 or later.
165165
2. Open a command prompt.
166166
3. Change directories to a location where you'd like a clone of this STL repository.
167167
4. `git clone https://github.com/microsoft/STL`
168168
5. `cd STL`
169-
6. `git submodule update --init vcpkg`
169+
6. `git submodule update --init --progress llvm-project vcpkg`
170170
7. `.\vcpkg\bootstrap-vcpkg.bat`
171171
8. `.\vcpkg\vcpkg.exe install boost-math:x86-windows boost-math:x64-windows`
172172

@@ -234,13 +234,12 @@ C:\Users\username\Desktop>dumpbin /IMPORTS .\example.exe | findstr msvcp
234234
# How To Run The Tests With A Native Tools Command Prompt
235235

236236
1. Follow either [How To Build With A Native Tools Command Prompt][] or [How To Build With The Visual Studio IDE][].
237-
2. Invoke `git submodule update --init llvm-project` at the root of the STL source tree.
238-
3. Acquire [Python][] 3.8 or newer and have it on the `PATH` (or run it directly using its absolute or relative path).
239-
4. Have LLVM's `bin` directory on the `PATH` (so `clang-cl.exe` is available).
237+
2. Acquire [Python][] 3.9 or newer and have it on the `PATH` (or run it directly using its absolute or relative path).
238+
3. Have LLVM's `bin` directory on the `PATH` (so `clang-cl.exe` is available).
240239
* We recommend selecting "C++ Clang tools for Windows" in the VS Installer. This will automatically add LLVM to the
241240
`PATH` of the x86 and x64 Native Tools Command Prompts, and will ensure that you're using a supported version.
242241
* Otherwise, use [LLVM's installer][] and choose to add LLVM to your `PATH` during installation.
243-
5. Follow the instructions below.
242+
4. Follow the instructions below.
244243

245244
## Running All The Tests
246245

@@ -397,7 +396,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
397396
[CMake]: https://cmake.org/download
398397
[Code of Conduct FAQ]: https://opensource.microsoft.com/codeofconduct/faq/
399398
[Compiler Explorer]: https://godbolt.org
400-
[Developer Community]: https://developercommunity.visualstudio.com/spaces/62/index.html
399+
[Developer Community]: https://aka.ms/feedback/report?space=62
401400
[Discord server]: https://discord.gg/XWanNww
402401
[How To Build With A Native Tools Command Prompt]: #how-to-build-with-a-native-tools-command-prompt
403402
[How To Build With The Visual Studio IDE]: #how-to-build-with-the-visual-studio-ide
@@ -406,10 +405,10 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
406405
[LWG issues]: https://cplusplus.github.io/LWG/lwg-toc.html
407406
[LWG tag]: https://github.com/microsoft/STL/issues?q=is%3Aopen+is%3Aissue+label%3ALWG
408407
[Microsoft Open Source Code of Conduct]: https://opensource.microsoft.com/codeofconduct/
409-
[N4861]: https://wg21.link/n4861
408+
[N4868]: https://wg21.link/n4868
410409
[NOTICE.txt]: NOTICE.txt
411410
[Ninja]: https://ninja-build.org
412-
[Pipelines]: https://dev.azure.com/vclibs/STL/_build/latest?definitionId=2&branchName=master
411+
[Pipelines]: https://dev.azure.com/vclibs/STL/_build/latest?definitionId=4&branchName=master
413412
[Python]: https://www.python.org/downloads/windows/
414413
[Roadmap]: https://github.com/microsoft/STL/wiki/Roadmap
415414
[Status Chart]: https://microsoft.github.io/STL/

azure-devops/create-vmss.ps1

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ $ErrorActionPreference = 'Stop'
1919

2020
$Location = 'westus2'
2121
$Prefix = 'StlBuild-' + (Get-Date -Format 'yyyy-MM-dd')
22-
$VMSize = 'Standard_D16as_v4'
22+
$VMSize = 'Standard_D32as_v4'
2323
$ProtoVMName = 'PROTOTYPE'
2424
$LiveVMPrefix = 'BUILD'
2525
$WindowsServerSku = '2019-Datacenter'
2626

2727
$ProgressActivity = 'Creating Scale Set'
28-
$TotalProgress = 11
28+
$TotalProgress = 12
2929
$CurrentProgress = 1
3030

3131
<#
@@ -159,6 +159,14 @@ function Wait-Shutdown {
159159
}
160160

161161

162+
####################################################################################################
163+
Write-Progress `
164+
-Activity $ProgressActivity `
165+
-Status 'Setting the subscription context' `
166+
-PercentComplete (100 / $TotalProgress * $CurrentProgress++)
167+
168+
Set-AzContext -SubscriptionName CPP_STL_GitHub
169+
162170
####################################################################################################
163171
Write-Progress `
164172
-Activity $ProgressActivity `
@@ -391,6 +399,4 @@ New-AzVmss `
391399
Write-Progress -Activity $ProgressActivity -Completed
392400
Write-Host "Location: $Location"
393401
Write-Host "Resource group name: $ResourceGroupName"
394-
Write-Host "User name: AdminUser"
395-
Write-Host "Using generated password: $AdminPW"
396402
Write-Host 'Finished!'

azure-devops/provision-image.ps1

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ $Workloads = @(
8888
'Microsoft.VisualStudio.Component.VC.CMake.Project',
8989
'Microsoft.VisualStudio.Component.VC.CoreIde',
9090
'Microsoft.VisualStudio.Component.VC.Llvm.Clang',
91+
'Microsoft.VisualStudio.Component.VC.Runtimes.ARM.Spectre',
92+
'Microsoft.VisualStudio.Component.VC.Runtimes.ARM64.Spectre',
93+
'Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre',
9194
'Microsoft.VisualStudio.Component.VC.Tools.ARM',
9295
'Microsoft.VisualStudio.Component.VC.Tools.ARM64',
9396
'Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
@@ -97,7 +100,10 @@ $Workloads = @(
97100
$ReleaseInPath = 'Preview'
98101
$Sku = 'Enterprise'
99102
$VisualStudioBootstrapperUrl = 'https://aka.ms/vs/16/pre/vs_enterprise.exe'
100-
$PythonUrl = 'https://www.python.org/ftp/python/3.8.5/python-3.8.5-amd64.exe'
103+
$PythonUrl = 'https://www.python.org/ftp/python/3.9.0/python-3.9.0-amd64.exe'
104+
105+
# https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk
106+
$WindowsDriverKitUrl = 'https://go.microsoft.com/fwlink/?linkid=2128854'
101107

102108
$CudaUrl = `
103109
'https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_426.00_win10.exe'
@@ -223,6 +229,36 @@ Function InstallPython {
223229
}
224230
}
225231

232+
<#
233+
.SYNOPSIS
234+
Installs the Windows Driver Kit.
235+
236+
.DESCRIPTION
237+
InstallWindowsDriverKit installs the Windows Driver Kit from the supplied URL.
238+
239+
.PARAMETER Url
240+
The URL of the Windows Driver Kit installer.
241+
#>
242+
Function InstallWindowsDriverKit {
243+
Param(
244+
[String]$Url
245+
)
246+
247+
Write-Host 'Downloading the Windows Driver Kit...'
248+
[string]$installerPath = Get-TempFilePath -Extension 'exe'
249+
curl.exe -L -o $installerPath -s -S $Url
250+
Write-Host 'Installing the Windows Driver Kit...'
251+
$proc = Start-Process -FilePath cmd.exe -ArgumentList `
252+
@('/c', 'start', '/wait', $installerPath, '/quiet', '/features', '+') -Wait -PassThru
253+
$exitCode = $proc.ExitCode
254+
if ($exitCode -eq 0) {
255+
Write-Host 'Installation successful!'
256+
}
257+
else {
258+
Write-Error "Installation failed! Exited with $exitCode."
259+
}
260+
}
261+
226262
<#
227263
.SYNOPSIS
228264
Installs NVIDIA's CUDA Toolkit.
@@ -300,6 +336,7 @@ Add-MpPreference -ExclusionProcess python.exe
300336

301337
InstallPython $PythonUrl
302338
InstallVisualStudio -Workloads $Workloads -BootstrapperUrl $VisualStudioBootstrapperUrl
339+
InstallWindowsDriverKit $WindowsDriverKitUrl
303340
InstallCuda -Url $CudaUrl -Features $CudaFeatures
304341

305342
Write-Host 'Updating PATH...'

0 commit comments

Comments
 (0)