Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
9ee5529
Let's rewrite the test harness (#1394)
cbezault Nov 6, 2020
32fe05b
Accelerate tests by dividing them into shards (#1414)
cbezault Nov 6, 2020
26bbe2a
<cmath>: Use intrinsics where possible (#1336)
sylveon Nov 6, 2020
6458199
<chrono>: [time.duration.io] output (#1341)
MattStephanson Nov 6, 2020
0650fa4
Prevent crash when custom streambuf implementation throws (#1358)
Arzaghi Nov 6, 2020
1093aa6
Implement ranges::drop_while_view (#1366)
miscco Nov 6, 2020
4c39427
Implement ranges::take_while_view (#1372)
miscco Nov 6, 2020
a6f285d
Include <cmeow> instead of <meow.h> (#1405)
StephanTLavavej Nov 6, 2020
7fd6501
Implement ranges::elements_view (#1406)
miscco Nov 7, 2020
537863a
Move from rvalue range adaptor closures (#1410)
CaseyCarter Nov 7, 2020
7e07ed8
Improve type traits usage (#1413)
StephanTLavavej Nov 7, 2020
231df15
Always remove_cvref_t the argument to enable_borrowed_range (#1415)
CaseyCarter Nov 7, 2020
0249612
Fix noexcept(noexcept(is_nothrow_v)) (#1417)
StephanTLavavej Nov 7, 2020
12a0e83
Rename _Iterator_base to _Category_base in <ranges> (#1420)
CaseyCarter Nov 7, 2020
04eca1c
hash<coroutine_handle<>>::operator() should be const (#1423)
CaseyCarter Nov 7, 2020
10d8e33
Extracted _Choice<T>._Strategy to variable (#1426)
futuarmo Nov 7, 2020
f873f51
README.md: Update DevCom and Pipelines links (#1427)
StephanTLavavej Nov 7, 2020
51ccd93
Port MSVC-internal changes, again (#1431)
StephanTLavavej Nov 7, 2020
9959929
<complex>: Improve numerical accuracy of sqrt and log (#935)
statementreply Nov 9, 2020
ea156e7
VS 2019 16.9 Preview 1 toolset update (#1451)
StephanTLavavej Nov 13, 2020
9145bf4
Tests using /analyze:only should also use /analyze:autolog- (#1434)
Arzaghi Nov 14, 2020
8b6e960
Updated _MSVC_STL_UPDATE to November 2020 (#1439)
avinal Nov 14, 2020
ff4c45b
README.md: Add llvm-project and --progress to the initial submodule s…
StephanTLavavej Nov 14, 2020
560bcea
Remove comments for resolved LWG issues (#1456)
miscco Nov 14, 2020
19c683d
Skip the flaky parts of VSO_0226079_mutex. (#1473)
StephanTLavavej Nov 14, 2020
d06561f
Code cleanups: Unify _Float_traits and _Floating_type_traits (#1442)
StephanTLavavej Dec 1, 2020
a92064e
LWG-3211 std::tuple<> should be trivially constructible (#1460)
futuarmo Dec 1, 2020
b4af6e9
_NODISCARD for function objects (#1474)
celonymire Dec 1, 2020
cbd2b1c
<compare>: Improve floating-point spaceship CPO codegen (#1475)
statementreply Dec 1, 2020
691346f
Correct comment for _List_val::_Sort. (#1476)
BillyONeal Dec 1, 2020
6fe20e6
LWG-3170 deprecated std::allocator<T>::is_always_equal (#1501)
futuarmo Dec 1, 2020
39ee107
LWG-3460 Unimplementable noop_coroutine_handle guarantees (#1452)
CaseyCarter Dec 2, 2020
9bb2a98
P1771R1 [[nodiscard]] For Constructors (#1495)
AdamBucior Dec 2, 2020
89c9592
valarray: Fix delete in order to satisfy ASan (#1496)
fsub Dec 2, 2020
f47e123
Add a pragma comment to pull in the synchronization lib (#1507)
cbezault Dec 2, 2020
c2ab522
Correct overly-strengthened noexcept-specifier for basic_string_view …
CaseyCarter Dec 2, 2020
2aa944b
LWG-3036 polymorphic_allocator::destroy is extraneous (#1455)
CaseyCarter Dec 3, 2020
8516f91
LWG-3448 transform_view's sentinel<false> not comparable with iterato…
miscco Dec 3, 2020
3703281
LWG-3464 istream::gcount() can overflow (#1483)
futuarmo Dec 3, 2020
debeb6f
Add _STD to improve tuple throughput (#1490)
StephanTLavavej Dec 3, 2020
82bb1bf
LWG-3117 Missing packaged_task deduction guides (#1493)
futuarmo Dec 3, 2020
4133091
<regex>: Follow the Standard in regex_traits::transform() (#1494)
Arzaghi Dec 3, 2020
2dbcfa5
Allow atomic_ref<const T> (#1500)
StephanTLavavej Dec 3, 2020
076863c
Rewrite InterlockedExchange128_nf with intrinsics on clang (#1509)
cbezault Dec 3, 2020
60d9ed7
Allow discarding unique_lock and shared_lock (#1514)
CaseyCarter Dec 3, 2020
e604b6c
Port internal stl/msbuild changes (#1515)
StephanTLavavej Dec 4, 2020
58160d5
Toolset update: VS 2019 16.9 Preview 2 with Clang 11
StephanTLavavej Dec 3, 2020
68b344c
Run clang-format 11; no manual changes.
StephanTLavavej Dec 9, 2020
335449f
Silence future "unused capture" warning (#1522)
CaseyCarter Dec 15, 2020
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
20 changes: 17 additions & 3 deletions .clang-format
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

# https://releases.llvm.org/10.0.0/tools/clang/docs/ClangFormatStyleOptions.html
# https://releases.llvm.org/11.0.0/tools/clang/docs/ClangFormatStyleOptions.html

---
# Language: Cpp
Expand All @@ -14,15 +14,18 @@ AlignAfterOpenBracket: DontAlign
AlignConsecutiveMacros: true
# AlignConsecutiveAssignments: false
AlignConsecutiveAssignments: true
# AlignConsecutiveBitFields: false
# AlignConsecutiveDeclarations: false
# AlignEscapedNewlines: Right
AlignEscapedNewlines: Left
# AlignOperands: true
# AlignOperands: Align
AlignOperands: AlignAfterOperator
# AlignTrailingComments: true
AlignTrailingComments: false
# AllowAllArgumentsOnNextLine: true
# AllowAllConstructorInitializersOnNextLine: true
# AllowAllParametersOfDeclarationOnNextLine: true
# AllowShortEnumsOnASingleLine: true
# AllowShortBlocksOnASingleLine: Never
# AllowShortCaseLabelsOnASingleLine: false
# AllowShortFunctionsOnASingleLine: All
Expand All @@ -40,7 +43,7 @@ AlwaysBreakTemplateDeclarations: Yes
# BraceWrapping:
# AfterCaseLabel: false
# AfterClass: false
# AfterControlStatement: false
# AfterControlStatement: Never
# AfterEnum: false
# AfterFunction: false
# AfterNamespace: false
Expand All @@ -50,6 +53,8 @@ AlwaysBreakTemplateDeclarations: Yes
# AfterExternBlock: false
# BeforeCatch: false
# BeforeElse: false
# BeforeLambdaBody: false
# BeforeWhile: false
# IndentBraces: false
# SplitEmptyFunction: true
# SplitEmptyRecord: true
Expand Down Expand Up @@ -112,12 +117,16 @@ IncludeCategories:
# IncludeIsMainRegex: '(Test)?$'
# IncludeIsMainSourceRegex: ''
# IndentCaseLabels: false
# IndentCaseBlocks: false
IndentCaseBlocks: true
# IndentGotoLabels: true
# IndentPPDirectives: None
# IndentExternBlock: AfterExternBlock
# IndentWidth: 2
IndentWidth: 4
# IndentWrappedFunctionNames: false
IndentWrappedFunctionNames: true
# InsertTrailingCommas: None
# JavaScriptQuotes: Leave
# JavaScriptWrapImports: true
# KeepEmptyLinesAtTheStartOfBlocks: true
Expand All @@ -130,6 +139,7 @@ MaxEmptyLinesToKeep: 2
NamespaceIndentation: All
# ObjCBinPackProtocolList: Auto
# ObjCBlockIndentWidth: 2
# ObjCBreakBeforeNestedBlockParam: true
# ObjCSpaceAfterProperty: false
# ObjCSpaceBeforeProtocolList: true
# PenaltyBreakAssignment: 2
Expand Down Expand Up @@ -184,4 +194,8 @@ StatementMacros:
# UseCRLF: false
UseCRLF: true
# UseTab: Never
# WhitespaceSensitiveMacros:
# - STRINGIZE
# - PP_STRINGIZE
# - BOOST_PP_STRINGIZE
...
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
name: cxx20 Feature
name: cxx23 Feature
about: For STL maintainers only
title: PAPER_NUMBER PAPER_TITLE
labels: cxx20
labels: cxx23
assignees: ''

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

Feature-test macro:
`#define MACRO_NAME MACRO_VALUE`

Note: We're still working on finishing C++20. Until we're done
with that (and the compiler implements distinct `/std:c++20` and
`/std:c++latest` options), we won't be able to review PRs for
C++23 features.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ if (NOT DEFINED CMAKE_TOOLCHAIN_FILE AND EXISTS "${CMAKE_CURRENT_LIST_DIR}/vcpkg
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake")
endif()

cmake_minimum_required(VERSION 3.17)
cmake_minimum_required(VERSION 3.18)
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
project(msvc_standard_libraries LANGUAGES CXX)

find_package(Boost REQUIRED)

set(VCLIBS_MIN_BOOST_VERSION 1.73.0)
set(VCLIBS_MIN_BOOST_VERSION 1.74.0)
if("${Boost_VERSION}" VERSION_LESS "${VCLIBS_MIN_BOOST_VERSION}")
message(FATAL_ERROR "Detected Boost version is too old (older than ${VCLIBS_MIN_BOOST_VERSION}).")
endif()
Expand Down
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,30 +143,30 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem
The STL uses boost-math headers to provide P0226R1 Mathematical Special Functions. We recommend using [vcpkg][] to
acquire this dependency.

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

# How To Build With A Native Tools Command Prompt

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

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

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

## Running All The Tests

Expand Down Expand Up @@ -397,7 +396,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
[CMake]: https://cmake.org/download
[Code of Conduct FAQ]: https://opensource.microsoft.com/codeofconduct/faq/
[Compiler Explorer]: https://godbolt.org
[Developer Community]: https://developercommunity.visualstudio.com/spaces/62/index.html
[Developer Community]: https://aka.ms/feedback/report?space=62
[Discord server]: https://discord.gg/XWanNww
[How To Build With A Native Tools Command Prompt]: #how-to-build-with-a-native-tools-command-prompt
[How To Build With The Visual Studio IDE]: #how-to-build-with-the-visual-studio-ide
Expand All @@ -409,7 +408,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
[N4868]: https://wg21.link/n4868
[NOTICE.txt]: NOTICE.txt
[Ninja]: https://ninja-build.org
[Pipelines]: https://dev.azure.com/vclibs/STL/_build/latest?definitionId=2&branchName=master
[Pipelines]: https://dev.azure.com/vclibs/STL/_build/latest?definitionId=4&branchName=master
[Python]: https://www.python.org/downloads/windows/
[Roadmap]: https://github.com/microsoft/STL/wiki/Roadmap
[Status Chart]: https://microsoft.github.io/STL/
Expand Down
12 changes: 9 additions & 3 deletions azure-devops/create-vmss.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ $LiveVMPrefix = 'BUILD'
$WindowsServerSku = '2019-Datacenter'

$ProgressActivity = 'Creating Scale Set'
$TotalProgress = 11
$TotalProgress = 12
$CurrentProgress = 1

<#
Expand Down Expand Up @@ -159,6 +159,14 @@ function Wait-Shutdown {
}


####################################################################################################
Write-Progress `
-Activity $ProgressActivity `
-Status 'Setting the subscription context' `
-PercentComplete (100 / $TotalProgress * $CurrentProgress++)

Set-AzContext -SubscriptionName CPP_STL_GitHub

####################################################################################################
Write-Progress `
-Activity $ProgressActivity `
Expand Down Expand Up @@ -391,6 +399,4 @@ New-AzVmss `
Write-Progress -Activity $ProgressActivity -Completed
Write-Host "Location: $Location"
Write-Host "Resource group name: $ResourceGroupName"
Write-Host "User name: AdminUser"
Write-Host "Using generated password: $AdminPW"
Write-Host 'Finished!'
37 changes: 37 additions & 0 deletions azure-devops/provision-image.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ $Workloads = @(
'Microsoft.VisualStudio.Component.VC.CMake.Project',
'Microsoft.VisualStudio.Component.VC.CoreIde',
'Microsoft.VisualStudio.Component.VC.Llvm.Clang',
'Microsoft.VisualStudio.Component.VC.Runtimes.ARM.Spectre',
'Microsoft.VisualStudio.Component.VC.Runtimes.ARM64.Spectre',
'Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre',
'Microsoft.VisualStudio.Component.VC.Tools.ARM',
'Microsoft.VisualStudio.Component.VC.Tools.ARM64',
'Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
Expand All @@ -99,6 +102,9 @@ $Sku = 'Enterprise'
$VisualStudioBootstrapperUrl = 'https://aka.ms/vs/16/pre/vs_enterprise.exe'
$PythonUrl = 'https://www.python.org/ftp/python/3.9.0/python-3.9.0-amd64.exe'

# https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk
$WindowsDriverKitUrl = 'https://go.microsoft.com/fwlink/?linkid=2128854'

$CudaUrl = `
'https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_426.00_win10.exe'
$CudaFeatures = 'nvcc_10.1 cuobjdump_10.1 nvprune_10.1 cupti_10.1 gpu_library_advisor_10.1 memcheck_10.1 ' + `
Expand Down Expand Up @@ -223,6 +229,36 @@ Function InstallPython {
}
}

<#
.SYNOPSIS
Installs the Windows Driver Kit.

.DESCRIPTION
InstallWindowsDriverKit installs the Windows Driver Kit from the supplied URL.

.PARAMETER Url
The URL of the Windows Driver Kit installer.
#>
Function InstallWindowsDriverKit {
Param(
[String]$Url
)

Write-Host 'Downloading the Windows Driver Kit...'
[string]$installerPath = Get-TempFilePath -Extension 'exe'
curl.exe -L -o $installerPath -s -S $Url
Write-Host 'Installing the Windows Driver Kit...'
$proc = Start-Process -FilePath cmd.exe -ArgumentList `
@('/c', 'start', '/wait', $installerPath, '/quiet', '/features', '+') -Wait -PassThru
$exitCode = $proc.ExitCode
if ($exitCode -eq 0) {
Write-Host 'Installation successful!'
}
else {
Write-Error "Installation failed! Exited with $exitCode."
}
}

<#
.SYNOPSIS
Installs NVIDIA's CUDA Toolkit.
Expand Down Expand Up @@ -300,6 +336,7 @@ Add-MpPreference -ExclusionProcess python.exe

InstallPython $PythonUrl
InstallVisualStudio -Workloads $Workloads -BootstrapperUrl $VisualStudioBootstrapperUrl
InstallWindowsDriverKit $WindowsDriverKitUrl
InstallCuda -Url $CudaUrl -Features $CudaFeatures

Write-Host 'Updating PATH...'
Expand Down
9 changes: 5 additions & 4 deletions azure-devops/run-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

jobs:
- job: ${{ parameters.targetPlatform }}
- job: '${{ parameters.targetPlatform }}_${{ parameters.shardNum }}'
timeoutInMinutes: 360

variables:
buildOutputLocation: 'D:\build\${{ parameters.targetPlatform }}'
litFlags: '-j$(testParallelism);--timeout=240;--shuffle;--xunit-xml-output=$(buildOutputLocation)/test-results.xml'
shardFlags: '--num-shards=${{ parameters.numShards }};--run-shard=${{ parameters.shardNum }}'
vcpkgLocation: '$(Build.SourcesDirectory)/vcpkg'
steps:
- script: |
Expand Down Expand Up @@ -62,8 +63,8 @@ jobs:
-host_arch=amd64 -arch=${{ parameters.vsDevCmdArch }} -no_logo
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=$(vcpkgLocation)\scripts\buildsystems\vcpkg.cmake ^
-DVCPKG_TARGET_TRIPLET=${{ parameters.targetPlatform }}-windows -DCMAKE_CXX_COMPILER=cl ^
-DCMAKE_BUILD_TYPE=Release -DLIT_FLAGS=$(litFlags) ^
-DCMAKE_CXX_FLAGS=/analyze ^
-DCMAKE_BUILD_TYPE=Release -DLIT_FLAGS=$(litFlags);$(shardFlags) ^
-DCMAKE_CXX_FLAGS=/analyze:autolog- ^
-S $(Build.SourcesDirectory) -B $(buildOutputLocation)
cmake --build $(buildOutputLocation)
displayName: 'Build the STL'
Expand All @@ -88,4 +89,4 @@ jobs:
searchFolder: $(buildOutputLocation)
testResultsFormat: JUnit
testResultsFiles: '**/test-results.xml'
testRunTitle: 'test-${{ parameters.targetPlatform }}'
testRunTitle: 'test-${{ parameters.targetPlatform }}-${{ parameters.shardNum }}'
Loading