Skip to content

Commit 4e6e433

Browse files
committed
Merge branch 'main' into gh1671
2 parents 40399b5 + 194efde commit 4e6e433

File tree

111 files changed

+6585
-1201
lines changed

Some content is hidden

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

111 files changed

+6585
-1201
lines changed

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
# Ensure GitHub detects our C++ code as C++ code.
88
/stl/inc/** linguist-language=C++
99
/stl/src/** linguist-language=C++
10+
*.h linguist-language=C++
11+
12+
# Ensure GitHub detects lit.cfg and lit.local.cfg as Python instead of HAProxy.
13+
*.cfg linguist-language=Python
1014

1115
# Ensure GitHub detects our Perl legacy test harness code as Perl code instead of Raku.
1216
*.pl linguist-language=Perl

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ project(msvc_standard_libraries LANGUAGES CXX)
1111

1212
find_package(Boost REQUIRED)
1313

14-
set(VCLIBS_MIN_BOOST_VERSION 1.74.0)
14+
set(VCLIBS_MIN_BOOST_VERSION 1.75.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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ 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.9 Preview 4 or later.
146+
1. Install Visual Studio 2019 16.10 Preview 1 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.
149149
* Otherwise, install [CMake][] 3.19 or later, and [Ninja][] 1.10.2 or later.
@@ -158,7 +158,7 @@ acquire this dependency.
158158

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

161-
1. Install Visual Studio 2019 16.9 Preview 4 or later.
161+
1. Install Visual Studio 2019 16.10 Preview 1 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.
164164
* Otherwise, install [CMake][] 3.19 or later, and [Ninja][] 1.10.2 or later.
@@ -234,7 +234,7 @@ 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. Acquire [Python][] 3.9.1 or newer and have it on the `PATH` (or run it directly using its absolute or relative path).
237+
2. Acquire [Python][] 3.9.2 or newer and have it on the `PATH` (or run it directly using its absolute or relative path).
238238
3. Have LLVM's `bin` directory on the `PATH` (so `clang-cl.exe` is available).
239239
* We recommend selecting "C++ Clang tools for Windows" in the VS Installer. This will automatically add LLVM to the
240240
`PATH` of the x86 and x64 Native Tools Command Prompts, and will ensure that you're using a supported version.
@@ -354,7 +354,7 @@ those features first the tests will begin passing unexpectedly for us and return
354354
this it is necessary to add a `PASS` entry to the `expected_results.txt` of the testsuite in question.
355355

356356
The `UNSUPPORTED` result code means that the requirements for a test are not met and so it will not be run. Currently
357-
all tests which use the `/BE` or `/clr:pure` options are unsupported.
357+
all tests which use the `/clr` or `/clr:pure` options are unsupported. Also, the `/BE` option is unsupported for x64.
358358

359359
The `SKIPPED` result code indicates that a given test was explicitly skipped by adding a `SKIPPED` entry to the
360360
`expected_results.txt`. A test may be skipped for a number of reasons, which include, but are not limited to:

azure-devops/create-vmss.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ $ErrorActionPreference = 'Stop'
2020
# https://aka.ms/azps-changewarnings
2121
$Env:SuppressAzurePowerShellBreakingChangeWarnings = 'true'
2222

23-
$Location = 'northeurope'
23+
$Location = 'westus2'
2424
$Prefix = 'StlBuild-' + (Get-Date -Format 'yyyy-MM-dd')
25-
$VMSize = 'Standard_D32as_v4'
25+
$VMSize = 'Standard_D32ds_v4'
2626
$ProtoVMName = 'PROTOTYPE'
2727
$LiveVMPrefix = 'BUILD'
2828
$WindowsServerSku = '2019-Datacenter'

azure-devops/provision-image.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ if ([string]::IsNullOrEmpty($AdminUserPassword)) {
9191
$PsExecPath = Join-Path $ExtractedPsToolsPath 'PsExec64.exe'
9292

9393
# https://github.com/PowerShell/PowerShell/releases/latest
94-
$PowerShellZipUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.1.1/PowerShell-7.1.1-win-x64.zip'
94+
$PowerShellZipUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.1.2/PowerShell-7.1.2-win-x64.zip'
9595
Write-Host "Downloading: $PowerShellZipUrl"
9696
$ExtractedPowerShellPath = DownloadAndExtractZip -Url $PowerShellZipUrl
9797
$PwshPath = Join-Path $ExtractedPowerShellPath 'pwsh.exe'
@@ -139,7 +139,7 @@ $Workloads = @(
139139
$ReleaseInPath = 'Preview'
140140
$Sku = 'Enterprise'
141141
$VisualStudioBootstrapperUrl = 'https://aka.ms/vs/16/pre/vs_enterprise.exe'
142-
$PythonUrl = 'https://www.python.org/ftp/python/3.9.1/python-3.9.1-amd64.exe'
142+
$PythonUrl = 'https://www.python.org/ftp/python/3.9.2/python-3.9.2-amd64.exe'
143143

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

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ variables:
88
buildOutputLocation: 'D:\build'
99
vcpkgLocation: '$(Build.SourcesDirectory)/vcpkg'
1010

11-
pool: 'StlBuild-2021-02-17'
11+
pool: 'StlBuild-2021-03-02'
1212

1313
stages:
1414
- stage: Code_Format

stl/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ set(HEADERS
177177
${CMAKE_CURRENT_LIST_DIR}/inc/semaphore
178178
${CMAKE_CURRENT_LIST_DIR}/inc/set
179179
${CMAKE_CURRENT_LIST_DIR}/inc/shared_mutex
180+
${CMAKE_CURRENT_LIST_DIR}/inc/source_location
180181
${CMAKE_CURRENT_LIST_DIR}/inc/span
181182
${CMAKE_CURRENT_LIST_DIR}/inc/sstream
182183
${CMAKE_CURRENT_LIST_DIR}/inc/stack

stl/inc/__msvc_all_public_headers.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
#include <limits>
4747
#include <numbers>
4848
#include <ratio>
49+
#include <source_location>
4950
#include <type_traits>
5051
#include <utility>
5152
#include <version>

stl/inc/algorithm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ namespace ranges {
538538

539539
template <forward_iterator _It, sentinel_for<_It> _Se, class _Pj = identity,
540540
indirect_binary_predicate<projected<_It, _Pj>, projected<_It, _Pj>> _Pr = ranges::equal_to>
541-
_NODISCARD constexpr _It operator()(_It _First, const _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) const {
541+
_NODISCARD constexpr _It operator()(_It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) const {
542542
_Adl_verify_range(_First, _Last);
543543

544544
auto _UResult = _Adjacent_find_unchecked(

stl/inc/array

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ public:
111111
return _Ptr == _Right._Ptr;
112112
}
113113

114+
#if _HAS_CXX20
115+
_NODISCARD constexpr strong_ordering operator<=>(const _Array_const_iterator& _Right) const noexcept {
116+
return _Ptr <=> _Right._Ptr;
117+
}
118+
#else // ^^^ _HAS_CXX20 ^^^ / vvv !_HAS_CXX20 vvv
114119
_NODISCARD _CONSTEXPR17 bool operator!=(const _Array_const_iterator& _Right) const noexcept {
115120
return !(*this == _Right);
116121
}
@@ -130,6 +135,7 @@ public:
130135
_NODISCARD _CONSTEXPR17 bool operator>=(const _Array_const_iterator& _Right) const noexcept {
131136
return !(*this < _Right);
132137
}
138+
#endif // !_HAS_CXX20
133139

134140
using _Prevent_inheriting_unwrap = _Array_const_iterator;
135141

@@ -235,6 +241,12 @@ private:
235241
return _Idx == _Right._Idx;
236242
}
237243

244+
#if _HAS_CXX20
245+
_NODISCARD constexpr strong_ordering operator<=>(const _Array_const_iterator& _Right) const noexcept {
246+
_Compat(_Right);
247+
return _Idx <=> _Right._Idx;
248+
}
249+
#else // ^^^ _HAS_CXX20 ^^^ / vvv !_HAS_CXX20 vvv
238250
_NODISCARD _CONSTEXPR17 bool operator!=(const _Array_const_iterator& _Right) const noexcept {
239251
return !(*this == _Right);
240252
}
@@ -255,6 +267,7 @@ private:
255267
_NODISCARD _CONSTEXPR17 bool operator>=(const _Array_const_iterator& _Right) const noexcept {
256268
return !(*this < _Right);
257269
}
270+
#endif // !_HAS_CXX20
258271

259272
_CONSTEXPR17 void _Compat(const _Array_const_iterator& _Right) const noexcept { // test for compatible iterator pair
260273
_STL_VERIFY(_Ptr == _Right._Ptr, "array iterators incompatible");
@@ -775,17 +788,41 @@ _CONSTEXPR20 void swap(array<_Ty, _Size>& _Left, array<_Ty, _Size>& _Right) noex
775788

776789
template <class _Ty, size_t _Size>
777790
_NODISCARD _CONSTEXPR20 bool operator==(const array<_Ty, _Size>& _Left, const array<_Ty, _Size>& _Right) {
791+
#ifdef __EDG__ // TRANSITION, VSO-1161663
778792
return _STD equal(_Left.begin(), _Left.end(), _Right.begin());
793+
#else // ^^^ workaround / no workaround vvv
794+
return _STD equal(_Left._Unchecked_begin(), _Left._Unchecked_end(), _Right._Unchecked_begin());
795+
#endif // ^^^ no workaround ^^^
779796
}
780797

798+
#if !_HAS_CXX20
781799
template <class _Ty, size_t _Size>
782-
_NODISCARD _CONSTEXPR20 bool operator!=(const array<_Ty, _Size>& _Left, const array<_Ty, _Size>& _Right) {
800+
_NODISCARD bool operator!=(const array<_Ty, _Size>& _Left, const array<_Ty, _Size>& _Right) {
783801
return !(_Left == _Right);
784802
}
803+
#endif // !_HAS_CXX20
785804

805+
#ifdef __cpp_lib_concepts
806+
template <class _Ty, size_t _Size>
807+
_NODISCARD constexpr _Synth_three_way_result<_Ty> operator<=>(
808+
const array<_Ty, _Size>& _Left, const array<_Ty, _Size>& _Right) {
809+
#ifdef __EDG__ // TRANSITION, VSO-1161663
810+
return _STD lexicographical_compare_three_way(
811+
_Left.begin(), _Left.end(), _Right.begin(), _Right.end(), _Synth_three_way{});
812+
#else // ^^^ workaround / no workaround vvv
813+
return _STD lexicographical_compare_three_way(_Left._Unchecked_begin(), _Left._Unchecked_end(),
814+
_Right._Unchecked_begin(), _Right._Unchecked_end(), _Synth_three_way{});
815+
#endif // ^^^ no workaround ^^^
816+
}
817+
#else // ^^^ defined(__cpp_lib_concepts) / !defined(__cpp_lib_concepts) vvv
786818
template <class _Ty, size_t _Size>
787819
_NODISCARD _CONSTEXPR20 bool operator<(const array<_Ty, _Size>& _Left, const array<_Ty, _Size>& _Right) {
820+
#ifdef __EDG__ // TRANSITION, VSO-1161663
788821
return _STD lexicographical_compare(_Left.begin(), _Left.end(), _Right.begin(), _Right.end());
822+
#else // ^^^ workaround / no workaround vvv
823+
return _STD lexicographical_compare(
824+
_Left._Unchecked_begin(), _Left._Unchecked_end(), _Right._Unchecked_begin(), _Right._Unchecked_end());
825+
#endif // ^^^ no workaround ^^^
789826
}
790827

791828
template <class _Ty, size_t _Size>
@@ -802,6 +839,7 @@ template <class _Ty, size_t _Size>
802839
_NODISCARD _CONSTEXPR20 bool operator>=(const array<_Ty, _Size>& _Left, const array<_Ty, _Size>& _Right) {
803840
return !(_Left < _Right);
804841
}
842+
#endif // ^^^ !defined(__cpp_lib_concepts) ^^^
805843

806844
#if _HAS_CXX20
807845
// FUNCTION TEMPLATE to_array

0 commit comments

Comments
 (0)