Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ 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.18)
cmake_minimum_required(VERSION 3.19)
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
project(msvc_standard_libraries LANGUAGES CXX)

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ 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.9 Preview 2 or later.
1. Install Visual Studio 2019 16.9 Preview 3 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.18 or later, and [Ninja][] 1.8.2 or later.
* Otherwise, install [CMake][] 3.19 or later, and [Ninja][] 1.10.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".
Expand All @@ -158,10 +158,10 @@ acquire this dependency.

# How To Build With A Native Tools Command Prompt

1. Install Visual Studio 2019 16.9 Preview 2 or later.
1. Install Visual Studio 2019 16.9 Preview 3 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.18 or later, and [Ninja][] 1.8.2 or later.
* Otherwise, install [CMake][] 3.19 or later, and [Ninja][] 1.10.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`
Expand Down Expand Up @@ -234,7 +234,7 @@ 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. Acquire [Python][] 3.9 or newer and have it on the `PATH` (or run it directly using its absolute or relative path).
2. Acquire [Python][] 3.9.1 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.
Expand Down
3 changes: 3 additions & 0 deletions azure-devops/create-vmss.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ or are running from Azure Cloud Shell.

$ErrorActionPreference = 'Stop'

# https://aka.ms/azps-changewarnings
$Env:SuppressAzurePowerShellBreakingChangeWarnings = 'true'

$Location = 'westus2'
$Prefix = 'StlBuild-' + (Get-Date -Format 'yyyy-MM-dd')
$VMSize = 'Standard_D32as_v4'
Expand Down
65 changes: 55 additions & 10 deletions azure-devops/provision-image.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,36 +50,75 @@ Function Get-TempFilePath {
return Join-Path $tempPath $tempName
}

<#
.SYNOPSIS
Downloads and extracts a ZIP file to a newly created temporary subdirectory.

.DESCRIPTION
DownloadAndExtractZip returns a path containing the extracted contents.

.PARAMETER Url
The URL of the ZIP file to download.
#>
Function DownloadAndExtractZip {
Param(
[String]$Url
)

if ([String]::IsNullOrWhiteSpace($Url)) {
throw 'Missing Url'
}

$ZipPath = Get-TempFilePath -Extension 'zip'
& curl.exe -L -o $ZipPath -s -S $Url
$TempSubdirPath = Get-TempFilePath -Extension 'dir'
Expand-Archive -Path $ZipPath -DestinationPath $TempSubdirPath -Force

return $TempSubdirPath
}

$TranscriptPath = 'C:\provision-image-transcript.txt'

if ([string]::IsNullOrEmpty($AdminUserPassword)) {
Start-Transcript -Path $TranscriptPath
Start-Transcript -Path $TranscriptPath -UseMinimalHeader
} else {
Write-Host 'AdminUser password supplied; switching to AdminUser.'
$PsExecPath = Get-TempFilePath -Extension 'exe'
Write-Host "Downloading psexec to: $PsExecPath"
& curl.exe -L -o $PsExecPath -s -S https://live.sysinternals.com/PsExec64.exe

# https://docs.microsoft.com/en-us/sysinternals/downloads/psexec
$PsToolsZipUrl = 'https://download.sysinternals.com/files/PSTools.zip'
Write-Host "Downloading: $PsToolsZipUrl"
$ExtractedPsToolsPath = DownloadAndExtractZip -Url $PsToolsZipUrl
$PsExecPath = Join-Path $ExtractedPsToolsPath 'PsExec64.exe'

# https://github.com/PowerShell/PowerShell/releases/latest
$PowerShellZipUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.1.1/PowerShell-7.1.1-win-x64.zip'
Write-Host "Downloading: $PowerShellZipUrl"
$ExtractedPowerShellPath = DownloadAndExtractZip -Url $PowerShellZipUrl
$PwshPath = Join-Path $ExtractedPowerShellPath 'pwsh.exe'

$PsExecArgs = @(
'-u',
'AdminUser',
'-p',
$AdminUserPassword,
'AdminUserPassword_REDACTED',
'-accepteula',
'-i',
'-h',
'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe',
$PwshPath,
'-ExecutionPolicy',
'Unrestricted',
'-File',
$PSCommandPath
)

Write-Host "Executing: $PsExecPath $PsExecArgs"
$PsExecArgs[3] = $AdminUserPassword

$proc = Start-Process -FilePath $PsExecPath -ArgumentList $PsExecArgs -Wait -PassThru
Write-Host 'Reading transcript...'
Get-Content -Path $TranscriptPath
Write-Host 'Cleaning up...'
Remove-Item $PsExecPath
Remove-Item -Recurse -Path $ExtractedPsToolsPath
Remove-Item -Recurse -Path $ExtractedPowerShellPath
exit $proc.ExitCode
}

Expand All @@ -100,7 +139,7 @@ $Workloads = @(
$ReleaseInPath = 'Preview'
$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'
$PythonUrl = 'https://www.python.org/ftp/python/3.9.1/python-3.9.1-amd64.exe'

# https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk
$WindowsDriverKitUrl = 'https://go.microsoft.com/fwlink/?linkid=2128854'
Expand Down Expand Up @@ -315,7 +354,7 @@ Function PipInstall {

try {
Write-Host "Installing or upgrading $Package..."
python.exe -m pip install --upgrade $Package
python.exe -m pip install --progress-bar off --upgrade $Package
Write-Host "Done installing or upgrading $Package."
}
catch {
Expand Down Expand Up @@ -358,3 +397,9 @@ Write-Host 'Finished updating PATH!'

PipInstall pip
PipInstall psutil

# https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/bcdedit--set#verification-settings
Write-Host 'Enabling test-signed kernel-mode drivers...'
bcdedit /set testsigning on

Write-Host 'Done!'
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
variables:
tmpDir: 'D:\Temp'

pool: 'StlBuild-2020-12-08-1'
pool: 'StlBuild-2021-01-20-2'

stages:
- stage: Code_Format
Expand Down
4 changes: 4 additions & 0 deletions tests/std/tests/P0220R1_optional/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5495,13 +5495,17 @@ constexpr int test()
{
optional<X> opt(in_place, 2);
Y y(3);
#ifndef __EDG__ // TRANSITION, VSO-1268140
assert(std::move(opt).value_or(y) == 2);
assert(*opt == 0);
#endif // ^^^ no workaround ^^^
}
{
optional<X> opt(in_place, 2);
#ifndef __EDG__ // TRANSITION, VSO-1268140
assert(std::move(opt).value_or(Y(3)) == 2);
assert(*opt == 0);
#endif // ^^^ no workaround ^^^
}
{
optional<X> opt;
Expand Down