Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
32d2755
Test deduction guides with header units internally (#1567)
StephanTLavavej Feb 24, 2021
b52c379
P1614R2 Adding Spaceship <=> To The Library (#1678)
StephanTLavavej Feb 25, 2021
8734115
Enable constexpr_vector_bool internal testing (#1698)
eldakesh-ms Feb 25, 2021
d7be0ec
Skip tr1/tests/thread, minor style cleanups (#1697)
StephanTLavavej Feb 26, 2021
49982c9
Comment calendar date conversion algorithm (#1646)
statementreply Feb 26, 2021
8f18867
<chrono>: fix year_month_day_last::day() (#1663)
SuperWig Feb 26, 2021
8a2c56d
Update outdated test options in readme (#1664)
jangzn Feb 26, 2021
66ca0f3
Uses-Allocator and Guaranteed Copy Elision For Piecewise Construction…
AdamBucior Feb 26, 2021
6dd9e24
<charconv>: to_chars libc++ compatibility (#1670)
mordante Feb 26, 2021
9c79c21
<memory>: Guard aligned allocation with __cpp_aligned_new (#1689)
CaseyCarter Feb 26, 2021
ec932c0
<xkeycheck.h>: Fix circular inclusion for Header Units (#1692)
StephanTLavavej Feb 26, 2021
663f0dd
Implement ranges::iota_view (#1693)
CaseyCarter Feb 26, 2021
52b7b32
P0980R1 constexpr std::string (#1502)
miscco Feb 27, 2021
30ac440
P1208R6 <source_location> (#664)
SuperWig Mar 2, 2021
3c5e7da
<iomanip>: get_time handles leading zeros incorrectly (#1620)
MattStephanson Mar 2, 2021
4e38117
Enforce is_clock_v in Clause 32 [thread] headers (#1687)
cpplearner Mar 2, 2021
5934eb7
Fix bug in memset optimization of ranges::uninitialized_value_constru…
miscco Mar 2, 2021
2e4ad02
_NODISCARD should appear before __declspec (#1703)
StephanTLavavej Mar 2, 2021
108a112
Update _MSVC_STL_UPDATE to March 2021 (#1708)
hatcat Mar 2, 2021
ba47118
Toolset update: VS 2019 16.10 Preview 1 (#1711)
StephanTLavavej Mar 4, 2021
194efde
Fix ranges::uninitialized_copy/uninitialized_move for trivial types (…
miscco Mar 4, 2021
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
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
# Ensure GitHub detects our C++ code as C++ code.
/stl/inc/** linguist-language=C++
/stl/src/** linguist-language=C++
*.h linguist-language=C++

# Ensure GitHub detects lit.cfg and lit.local.cfg as Python instead of HAProxy.
*.cfg linguist-language=Python

# Ensure GitHub detects our Perl legacy test harness code as Perl code instead of Raku.
*.pl linguist-language=Perl
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ project(msvc_standard_libraries LANGUAGES CXX)

find_package(Boost REQUIRED)

set(VCLIBS_MIN_BOOST_VERSION 1.74.0)
set(VCLIBS_MIN_BOOST_VERSION 1.75.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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ 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 4 or later.
1. Install Visual Studio 2019 16.10 Preview 1 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.19 or later, and [Ninja][] 1.10.2 or later.
Expand All @@ -158,7 +158,7 @@ acquire this dependency.

# How To Build With A Native Tools Command Prompt

1. Install Visual Studio 2019 16.9 Preview 4 or later.
1. Install Visual Studio 2019 16.10 Preview 1 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.19 or later, and [Ninja][] 1.10.2 or later.
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.1 or newer and have it on the `PATH` (or run it directly using its absolute or relative path).
2. Acquire [Python][] 3.9.2 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 Expand Up @@ -354,7 +354,7 @@ those features first the tests will begin passing unexpectedly for us and return
this it is necessary to add a `PASS` entry to the `expected_results.txt` of the testsuite in question.

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

The `SKIPPED` result code indicates that a given test was explicitly skipped by adding a `SKIPPED` entry to the
`expected_results.txt`. A test may be skipped for a number of reasons, which include, but are not limited to:
Expand Down
4 changes: 2 additions & 2 deletions azure-devops/create-vmss.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ $ErrorActionPreference = 'Stop'
# https://aka.ms/azps-changewarnings
$Env:SuppressAzurePowerShellBreakingChangeWarnings = 'true'

$Location = 'northeurope'
$Location = 'westus2'
$Prefix = 'StlBuild-' + (Get-Date -Format 'yyyy-MM-dd')
$VMSize = 'Standard_D32as_v4'
$VMSize = 'Standard_D32ds_v4'
$ProtoVMName = 'PROTOTYPE'
$LiveVMPrefix = 'BUILD'
$WindowsServerSku = '2019-Datacenter'
Expand Down
4 changes: 2 additions & 2 deletions azure-devops/provision-image.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ if ([string]::IsNullOrEmpty($AdminUserPassword)) {
$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'
$PowerShellZipUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.1.2/PowerShell-7.1.2-win-x64.zip'
Write-Host "Downloading: $PowerShellZipUrl"
$ExtractedPowerShellPath = DownloadAndExtractZip -Url $PowerShellZipUrl
$PwshPath = Join-Path $ExtractedPowerShellPath 'pwsh.exe'
Expand Down Expand Up @@ -139,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.1/python-3.9.1-amd64.exe'
$PythonUrl = 'https://www.python.org/ftp/python/3.9.2/python-3.9.2-amd64.exe'

# https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk
$WindowsDriverKitUrl = 'https://go.microsoft.com/fwlink/?linkid=2128854'
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ variables:
buildOutputLocation: 'D:\build'
vcpkgLocation: '$(Build.SourcesDirectory)/vcpkg'

pool: 'StlBuild-2021-02-17'
pool: 'StlBuild-2021-03-02'

stages:
- stage: Code_Format
Expand Down
1 change: 1 addition & 0 deletions stl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ set(HEADERS
${CMAKE_CURRENT_LIST_DIR}/inc/semaphore
${CMAKE_CURRENT_LIST_DIR}/inc/set
${CMAKE_CURRENT_LIST_DIR}/inc/shared_mutex
${CMAKE_CURRENT_LIST_DIR}/inc/source_location
${CMAKE_CURRENT_LIST_DIR}/inc/span
${CMAKE_CURRENT_LIST_DIR}/inc/sstream
${CMAKE_CURRENT_LIST_DIR}/inc/stack
Expand Down
1 change: 1 addition & 0 deletions stl/inc/__msvc_all_public_headers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include <limits>
#include <numbers>
#include <ratio>
#include <source_location>
#include <type_traits>
#include <utility>
#include <version>
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/algorithm
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ namespace ranges {

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

auto _UResult = _Adjacent_find_unchecked(
Expand Down
40 changes: 39 additions & 1 deletion stl/inc/array
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ public:
return _Ptr == _Right._Ptr;
}

#if _HAS_CXX20
_NODISCARD constexpr strong_ordering operator<=>(const _Array_const_iterator& _Right) const noexcept {
return _Ptr <=> _Right._Ptr;
}
#else // ^^^ _HAS_CXX20 ^^^ / vvv !_HAS_CXX20 vvv
_NODISCARD _CONSTEXPR17 bool operator!=(const _Array_const_iterator& _Right) const noexcept {
return !(*this == _Right);
}
Expand All @@ -130,6 +135,7 @@ public:
_NODISCARD _CONSTEXPR17 bool operator>=(const _Array_const_iterator& _Right) const noexcept {
return !(*this < _Right);
}
#endif // !_HAS_CXX20

using _Prevent_inheriting_unwrap = _Array_const_iterator;

Expand Down Expand Up @@ -235,6 +241,12 @@ private:
return _Idx == _Right._Idx;
}

#if _HAS_CXX20
_NODISCARD constexpr strong_ordering operator<=>(const _Array_const_iterator& _Right) const noexcept {
_Compat(_Right);
return _Idx <=> _Right._Idx;
}
#else // ^^^ _HAS_CXX20 ^^^ / vvv !_HAS_CXX20 vvv
_NODISCARD _CONSTEXPR17 bool operator!=(const _Array_const_iterator& _Right) const noexcept {
return !(*this == _Right);
}
Expand All @@ -255,6 +267,7 @@ private:
_NODISCARD _CONSTEXPR17 bool operator>=(const _Array_const_iterator& _Right) const noexcept {
return !(*this < _Right);
}
#endif // !_HAS_CXX20

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

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

#if !_HAS_CXX20
template <class _Ty, size_t _Size>
_NODISCARD _CONSTEXPR20 bool operator!=(const array<_Ty, _Size>& _Left, const array<_Ty, _Size>& _Right) {
_NODISCARD bool operator!=(const array<_Ty, _Size>& _Left, const array<_Ty, _Size>& _Right) {
return !(_Left == _Right);
}
#endif // !_HAS_CXX20

#ifdef __cpp_lib_concepts
template <class _Ty, size_t _Size>
_NODISCARD constexpr _Synth_three_way_result<_Ty> operator<=>(
const array<_Ty, _Size>& _Left, const array<_Ty, _Size>& _Right) {
#ifdef __EDG__ // TRANSITION, VSO-1161663
return _STD lexicographical_compare_three_way(
_Left.begin(), _Left.end(), _Right.begin(), _Right.end(), _Synth_three_way{});
#else // ^^^ workaround / no workaround vvv
return _STD lexicographical_compare_three_way(_Left._Unchecked_begin(), _Left._Unchecked_end(),
_Right._Unchecked_begin(), _Right._Unchecked_end(), _Synth_three_way{});
#endif // ^^^ no workaround ^^^
}
#else // ^^^ defined(__cpp_lib_concepts) / !defined(__cpp_lib_concepts) vvv
template <class _Ty, size_t _Size>
_NODISCARD _CONSTEXPR20 bool operator<(const array<_Ty, _Size>& _Left, const array<_Ty, _Size>& _Right) {
#ifdef __EDG__ // TRANSITION, VSO-1161663
return _STD lexicographical_compare(_Left.begin(), _Left.end(), _Right.begin(), _Right.end());
#else // ^^^ workaround / no workaround vvv
return _STD lexicographical_compare(
_Left._Unchecked_begin(), _Left._Unchecked_end(), _Right._Unchecked_begin(), _Right._Unchecked_end());
#endif // ^^^ no workaround ^^^
}

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

#if _HAS_CXX20
// FUNCTION TEMPLATE to_array
Expand Down
2 changes: 2 additions & 0 deletions stl/inc/bitset
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,11 @@ public:
return _CSTD memcmp(&_Array[0], &_Right._Array[0], sizeof(_Array)) == 0;
}

#if !_HAS_CXX20
_NODISCARD bool operator!=(const bitset& _Right) const noexcept {
return !(*this == _Right);
}
#endif // !_HAS_CXX20

_NODISCARD bool test(size_t _Pos) const {
if (_Bits <= _Pos) {
Expand Down
3 changes: 3 additions & 0 deletions stl/inc/charconv
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ to_chars_result to_chars(char* _First, char* _Last, bool _Value, int _Base = 10)
struct from_chars_result {
const char* ptr;
errc ec;
#if _HAS_CXX20
_NODISCARD friend bool operator==(const from_chars_result&, const from_chars_result&) = default;
#endif // _HAS_CXX20
};

// FUNCTION from_chars (STRING TO INTEGER)
Expand Down
Loading