Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c77d0d7
Use PowerShell 7.4.1.
StephanTLavavej Feb 13, 2024
f999068
Python 3.12.2.
StephanTLavavej Feb 13, 2024
1dbcbc4
New pool.
StephanTLavavej Feb 13, 2024
87cd058
VS 2022 17.10 Preview 1.
StephanTLavavej Feb 13, 2024
d6818f1
CMake 3.28.
StephanTLavavej Feb 13, 2024
dc928fd
Require VS 2022 17.10 (aka MSVC 19.40).
StephanTLavavej Feb 13, 2024
583b827
Require CMake 3.28.
StephanTLavavej Feb 13, 2024
644d273
Update citations: DevCom-10543093 (not entirely fixed) => VSO-1956799
StephanTLavavej Feb 15, 2024
d08cac5
Update citations: LLVM-45398 (resolved as duplicate) => LLVM-35450
StephanTLavavej Feb 13, 2024
af657c0
Update citations: VSO-1854243 (duplicate of upstream) => google/sanit…
StephanTLavavej Feb 13, 2024
a84054c
Update citations: URL => google/sanitizers#295
StephanTLavavej Feb 13, 2024
028c466
Update citations: OS-11107628 (archived) => ArchivedOS-12440914
StephanTLavavej Feb 14, 2024
a48f93f
Update citations: OS-17090155 (archived) => ArchivedOS-17501595
StephanTLavavej Feb 14, 2024
e7dc0b0
Remove UCRT workaround for ArchivedOS-17501595.
StephanTLavavej Feb 14, 2024
4da20a5
Remove Clang workarounds for LLVM-48173.
StephanTLavavej Feb 14, 2024
a89bc45
Remove Clang workaround for LLVM-48305.
StephanTLavavej Feb 14, 2024
5620409
Remove Clang workaround in test_header_units_and_modules.hpp.
StephanTLavavej Feb 14, 2024
a15f699
Remove Clang workarounds in P0009R18_mdspan_mdspan.
StephanTLavavej Feb 14, 2024
8b492c2
Remove Clang workaround in P2374R4_views_cartesian_product_recommende…
StephanTLavavej Feb 14, 2024
18b60a5
Remove MSVC FAILs for tests that are passing now.
StephanTLavavej Feb 14, 2024
ac21a6d
Remove `_MSVC_INTERNAL_TESTING` workaround in P1208R6_source_location.
StephanTLavavej Feb 14, 2024
821f3e9
Remove `_MSVC_INTERNAL_TESTING` workarounds in P2465R3_standard_libra…
StephanTLavavej Feb 14, 2024
7158d33
Remove MSVC workaround for DevCom-1516290.
StephanTLavavej Feb 14, 2024
99814f7
Remove MSVC workaround for DevCom-10095944.
StephanTLavavej Feb 14, 2024
58b746f
Remove MSVC workarounds for DevCom-10519736.
StephanTLavavej Feb 14, 2024
343c6c7
Remove MSVC workarounds for DevCom-10548086.
StephanTLavavej Feb 14, 2024
24b44e9
Remove MSVC workaround for VSO-1854035.
StephanTLavavej Feb 14, 2024
a025cc4
Remove some MSVC workarounds for VSO-1854115.
StephanTLavavej Feb 14, 2024
e3ba6ee
Remove incorrect citations of VSO-1854115.
StephanTLavavej Feb 14, 2024
db6457e
Remove EDG workarounds for VSO-1900291.
StephanTLavavej Feb 14, 2024
b2a3658
Remove EDG workaround for DevCom-1670927, add perma-workaround for VS…
StephanTLavavej Feb 14, 2024
f633a83
Extend MSVC workaround for VSO-1948221 (constexpr type_info ICE) whic…
StephanTLavavej Feb 14, 2024
e4633ab
Update workaround in basic_format_arg: Clang and EDG still need it, M…
StephanTLavavej Feb 14, 2024
af760f5
Add CUDA workaround `--allow-unsupported-compiler` to GH_000639_nvcc_…
StephanTLavavej Feb 14, 2024
80b1723
Increase overall and test timeouts to 30 minutes.
StephanTLavavej Feb 14, 2024
d8187e3
Comment cleanup requested in review of GH 4366.
StephanTLavavej Feb 14, 2024
34ad220
Comment cleanup requested in review of GH 4375.
StephanTLavavej Feb 15, 2024
e8fd05f
Comment additions requested in review of GH 3928.
StephanTLavavej Feb 15, 2024
d3faadd
Comment cleanups: Hexfloat machinery doesn't need to say "added with …
StephanTLavavej Feb 15, 2024
8482fb2
Comment cleanups: Consistently hyphenate "floating-point" in headers.
StephanTLavavej Feb 15, 2024
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
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

cmake_minimum_required(VERSION 3.27.0)
cmake_minimum_required(VERSION 3.28.0)

set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
project(msvc_standard_libraries LANGUAGES CXX)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem

# How To Build With The Visual Studio IDE

1. Install Visual Studio 2022 17.9 Preview 2 or later.
1. Install Visual Studio 2022 17.10 Preview 1 or later.
* Select "Windows 11 SDK (10.0.22000.0)" in the VS Installer.
* 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.27.0 or later, and [Ninja][] 1.11.0 or later.
* Otherwise, install [CMake][] 3.28.0 or later, and [Ninja][] 1.11.0 or later.
* Make sure [Python][] 3.12 or later is available to CMake.
2. Open Visual Studio, and choose the "Clone or check out code" option. Enter the URL of this repository,
`https://github.com/microsoft/STL`.
Expand All @@ -156,11 +156,11 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem

# How To Build With A Native Tools Command Prompt

1. Install Visual Studio 2022 17.9 Preview 2 or later.
1. Install Visual Studio 2022 17.10 Preview 1 or later.
* Select "Windows 11 SDK (10.0.22000.0)" in the VS Installer.
* 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.27.0 or later, and [Ninja][] 1.11.0 or later.
* Otherwise, install [CMake][] 3.28.0 or later, and [Ninja][] 1.11.0 or later.
* Make sure [Python][] 3.12 or later is available to CMake.
2. Open a command prompt.
3. Change directories to a location where you'd like a clone of this STL repository.
Expand Down
2 changes: 1 addition & 1 deletion azure-devops/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

variables:
- name: poolName
value: 'StlBuild-2024-01-09T1215-Pool'
value: 'StlBuild-2024-02-13T1246-Pool'
readonly: true
- name: poolDemands
value: 'EnableSpotVM -equals true'
Expand Down
2 changes: 1 addition & 1 deletion azure-devops/cross-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- job: '${{ parameters.targetPlatform }}'
strategy:
parallel: ${{ parameters.numShards }}
timeoutInMinutes: 25
timeoutInMinutes: 30
steps:
- script: |
if exist "$(tmpDir)" (rmdir /S /Q $(tmpDir))
Expand Down
2 changes: 1 addition & 1 deletion azure-devops/native-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- job: '${{ parameters.targetPlatform }}'
strategy:
parallel: ${{ parameters.numShards }}
timeoutInMinutes: 25
timeoutInMinutes: 30
steps:
- script: |
if exist "$(tmpDir)" (rmdir /S /Q $(tmpDir))
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.4.0/PowerShell-7.4.0-win-x64.zip'
$PowerShellZipUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.4.1/PowerShell-7.4.1-win-x64.zip'
Write-Host "Downloading: $PowerShellZipUrl"
$ExtractedPowerShellPath = DownloadAndExtractZip -Url $PowerShellZipUrl
$PwshPath = Join-Path $ExtractedPowerShellPath 'pwsh.exe'
Expand Down Expand Up @@ -136,7 +136,7 @@ $Workloads = @(
)

$VisualStudioBootstrapperUrl = 'https://aka.ms/vs/17/pre/vs_enterprise.exe'
$PythonUrl = 'https://www.python.org/ftp/python/3.12.1/python-3.12.1-amd64.exe'
$PythonUrl = 'https://www.python.org/ftp/python/3.12.2/python-3.12.2-amd64.exe'

$CudaUrl = 'https://developer.download.nvidia.com/compute/cuda/11.6.0/local_installers/cuda_11.6.0_511.23_windows.exe'

Expand Down
2 changes: 1 addition & 1 deletion azure-devops/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ parameters:
steps:
- task: CmdLine@2
displayName: ${{ parameters.displayName }}
timeoutInMinutes: 20
timeoutInMinutes: 30
condition: succeeded()
inputs:
workingDirectory: $(buildOutputLocation)
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/CMakeLists.txt
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

cmake_minimum_required(VERSION 3.27.0)
cmake_minimum_required(VERSION 3.28.0)
project(msvc_standard_libraries_benchmarks LANGUAGES CXX)

if(DEFINED STL_BINARY_DIR)
Expand Down
10 changes: 0 additions & 10 deletions stl/inc/__msvc_all_public_headers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,6 @@
#include <mbctype.h>
#endif // !defined(_MSVC_TESTING_NVCC)

#if 1 // TRANSITION, OS-17090155 (UCRT)
#define _CRT_DECLARE_NONSTDC_NAMES 0
#ifndef _MSVC_TESTING_NVCC
#include <sys/stat.h>
#include <sys/timeb.h>
#include <sys/utime.h>
#endif // !defined(_MSVC_TESTING_NVCC)
#undef _CRT_DECLARE_NONSTDC_NAMES
#endif // TRANSITION, OS-17090155 (UCRT)

#define _SILENCE_CXX17_C_HEADER_DEPRECATION_WARNING
#define _SILENCE_CXX20_CISO646_REMOVED_WARNING
#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
Expand Down
6 changes: 1 addition & 5 deletions stl/inc/__msvc_iter_core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,11 +405,7 @@ concept weakly_incrementable = movable<_Ty>
requires _Signed_integer_like<iter_difference_t<_Ty>>;
{ ++__i } -> same_as<_Ty&>;
__i++;
}
#ifdef __clang__ // TRANSITION, LLVM-48173
&& !same_as<_Ty, bool>
#endif // ^^^ workaround ^^^
;
};

_EXPORT_STD template <class _It>
concept input_or_output_iterator = requires(_It __i) { { *__i } -> _Can_reference; }
Expand Down
12 changes: 4 additions & 8 deletions stl/inc/atomic
Original file line number Diff line number Diff line change
Expand Up @@ -2696,27 +2696,23 @@ _Ty atomic_fetch_xor_explicit(

#if _HAS_CXX20
_EXPORT_STD template <class _Ty>
void atomic_wait(const volatile atomic<_Ty>* const _Mem,
const typename atomic<_Ty>::value_type _Expected) noexcept { // TRANSITION, VSO-1854115, omit typename
void atomic_wait(const volatile atomic<_Ty>* const _Mem, const typename atomic<_Ty>::value_type _Expected) noexcept {
_Mem->wait(_Expected);
}

_EXPORT_STD template <class _Ty>
void atomic_wait(const atomic<_Ty>* const _Mem,
const typename atomic<_Ty>::value_type _Expected) noexcept { // TRANSITION, VSO-1854115, omit typename
void atomic_wait(const atomic<_Ty>* const _Mem, const typename atomic<_Ty>::value_type _Expected) noexcept {
_Mem->wait(_Expected);
}

_EXPORT_STD template <class _Ty>
void atomic_wait_explicit(const volatile atomic<_Ty>* const _Mem,
const typename atomic<_Ty>::value_type _Expected, // TRANSITION, VSO-1854115, omit typename
void atomic_wait_explicit(const volatile atomic<_Ty>* const _Mem, const typename atomic<_Ty>::value_type _Expected,
const memory_order _Order) noexcept {
_Mem->wait(_Expected, _Order);
}

_EXPORT_STD template <class _Ty>
void atomic_wait_explicit(const atomic<_Ty>* const _Mem,
const typename atomic<_Ty>::value_type _Expected, // TRANSITION, VSO-1854115, omit typename
void atomic_wait_explicit(const atomic<_Ty>* const _Mem, const typename atomic<_Ty>::value_type _Expected,
const memory_order _Order) noexcept {
_Mem->wait(_Expected, _Order);
}
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/chrono
Original file line number Diff line number Diff line change
Expand Up @@ -3459,7 +3459,7 @@ namespace chrono {
// 86,400*INTMAX_MAX ~= 7.97e23. This is representable by float and double, so they can always represent
// at least one day. On the other hand, one second with the largest possible _Period1 needs a tick count
// of 1/(INTMAX_MAX) ~= 1.08e-19, which is also representable in both float and double. So, both
// floating point types can represent durations between one second and one day, regardless of _Period1.
// floating-point types can represent durations between one second and one day, regardless of _Period1.
return true;
} else {
// TRANSITION: user-defined arithmetic-like types
Expand Down
8 changes: 4 additions & 4 deletions stl/inc/exception
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,12 @@ public:
return !(_Lhs == _Rhs);
}

_NODISCARD_FRIEND bool operator!=(const exception_ptr& _Lhs, nullptr_t _Rhs) noexcept {
return !(_Lhs == _Rhs);
_NODISCARD_FRIEND bool operator!=(const exception_ptr& _Lhs, nullptr_t) noexcept {
return !(_Lhs == nullptr);
}

_NODISCARD_FRIEND bool operator!=(nullptr_t _Lhs, const exception_ptr& _Rhs) noexcept {
return !(_Lhs == _Rhs);
_NODISCARD_FRIEND bool operator!=(nullptr_t, const exception_ptr& _Rhs) noexcept {
return !(nullptr == _Rhs);
}
#endif // !_HAS_CXX20

Expand Down
5 changes: 4 additions & 1 deletion stl/inc/format
Original file line number Diff line number Diff line change
Expand Up @@ -722,8 +722,11 @@ public:
}
};

// TRANSITION, LLVM-49072
#if defined(__clang__) || defined(__EDG__) // TRANSITION, LLVM-81774 (Clang), VSO-1956558 (EDG)
basic_format_arg() noexcept : _Active_state(_Basic_format_arg_type::_None), _No_state() {}
#else // ^^^ workaround / no workaround vvv
basic_format_arg() noexcept = default;
#endif // ^^^ no workaround ^^^

explicit operator bool() const noexcept {
return _Active_state != _Basic_format_arg_type::_None;
Expand Down
52 changes: 20 additions & 32 deletions stl/inc/memory
Original file line number Diff line number Diff line change
Expand Up @@ -1483,26 +1483,14 @@ struct _SP_convertible : is_convertible<_Yty*, _Ty*>::type {};

template <class _Yty, class _Uty, class _Void>
struct _SP_convertible<_Yty, _Uty[], _Void> : false_type {};
#if defined(__clang__) || defined(__EDG__) // TRANSITION, DevCom-10548086
template <class _Yty, class _Uty>
struct _SP_convertible<_Yty, _Uty[], void_t<_Yty (*)[]>> : is_convertible<_Yty (*)[], _Uty (*)[]>::type {};
#else // ^^^ no workaround / workaround vvv
template <class _Yty, class _Uty>
struct _SP_convertible<_Yty, _Uty[], void_t<decltype(static_cast<_Yty (*)[]>(nullptr))>>
: is_convertible<_Yty (*)[], _Uty (*)[]>::type {};
#endif // ^^^ workaround ^^^

template <class _Yty, class _Uty, size_t _Ext, class _Void>
struct _SP_convertible<_Yty, _Uty[_Ext], _Void> : false_type {};
#if defined(__clang__) || defined(__EDG__) // TRANSITION, DevCom-10548086
template <class _Yty, class _Uty, size_t _Ext>
struct _SP_convertible<_Yty, _Uty[_Ext], void_t<_Yty (*)[_Ext]>>
: is_convertible<_Yty (*)[_Ext], _Uty (*)[_Ext]>::type {};
#else // ^^^ no workaround / workaround vvv
template <class _Yty, class _Uty, size_t _Ext>
struct _SP_convertible<_Yty, _Uty[_Ext], void_t<decltype(static_cast<_Yty (*)[_Ext]>(nullptr))>>
: is_convertible<_Yty (*)[_Ext], _Uty (*)[_Ext]>::type {};
#endif // ^^^ workaround ^^^

template <class _Yty, class _Ty>
struct _SP_pointer_compatible : is_convertible<_Yty*, _Ty*>::type {
Expand Down Expand Up @@ -3699,56 +3687,56 @@ _NODISCARD bool operator==(nullptr_t, const unique_ptr<_Ty, _Dx>& _Right) noexce
}

template <class _Ty, class _Dx>
_NODISCARD bool operator!=(const unique_ptr<_Ty, _Dx>& _Left, nullptr_t _Right) noexcept {
return !(_Left == _Right);
_NODISCARD bool operator!=(const unique_ptr<_Ty, _Dx>& _Left, nullptr_t) noexcept {
return !(_Left == nullptr);
}

template <class _Ty, class _Dx>
_NODISCARD bool operator!=(nullptr_t _Left, const unique_ptr<_Ty, _Dx>& _Right) noexcept {
return !(_Left == _Right);
_NODISCARD bool operator!=(nullptr_t, const unique_ptr<_Ty, _Dx>& _Right) noexcept {
return !(nullptr == _Right);
}
#endif // !_HAS_CXX20

_EXPORT_STD template <class _Ty, class _Dx>
_NODISCARD _CONSTEXPR23 bool operator<(const unique_ptr<_Ty, _Dx>& _Left, nullptr_t _Right) {
_NODISCARD _CONSTEXPR23 bool operator<(const unique_ptr<_Ty, _Dx>& _Left, nullptr_t) {
using _Ptr = typename unique_ptr<_Ty, _Dx>::pointer;
return less<_Ptr>{}(_Left.get(), _Right);
return less<_Ptr>{}(_Left.get(), nullptr);
}

_EXPORT_STD template <class _Ty, class _Dx>
_NODISCARD _CONSTEXPR23 bool operator<(nullptr_t _Left, const unique_ptr<_Ty, _Dx>& _Right) {
_NODISCARD _CONSTEXPR23 bool operator<(nullptr_t, const unique_ptr<_Ty, _Dx>& _Right) {
using _Ptr = typename unique_ptr<_Ty, _Dx>::pointer;
return less<_Ptr>{}(_Left, _Right.get());
return less<_Ptr>{}(nullptr, _Right.get());
}

_EXPORT_STD template <class _Ty, class _Dx>
_NODISCARD _CONSTEXPR23 bool operator>=(const unique_ptr<_Ty, _Dx>& _Left, nullptr_t _Right) {
return !(_Left < _Right);
_NODISCARD _CONSTEXPR23 bool operator>=(const unique_ptr<_Ty, _Dx>& _Left, nullptr_t) {
return !(_Left < nullptr);
}

_EXPORT_STD template <class _Ty, class _Dx>
_NODISCARD _CONSTEXPR23 bool operator>=(nullptr_t _Left, const unique_ptr<_Ty, _Dx>& _Right) {
return !(_Left < _Right);
_NODISCARD _CONSTEXPR23 bool operator>=(nullptr_t, const unique_ptr<_Ty, _Dx>& _Right) {
return !(nullptr < _Right);
}

_EXPORT_STD template <class _Ty, class _Dx>
_NODISCARD _CONSTEXPR23 bool operator>(const unique_ptr<_Ty, _Dx>& _Left, nullptr_t _Right) {
return _Right < _Left;
_NODISCARD _CONSTEXPR23 bool operator>(const unique_ptr<_Ty, _Dx>& _Left, nullptr_t) {
return nullptr < _Left;
}

_EXPORT_STD template <class _Ty, class _Dx>
_NODISCARD _CONSTEXPR23 bool operator>(nullptr_t _Left, const unique_ptr<_Ty, _Dx>& _Right) {
return _Right < _Left;
_NODISCARD _CONSTEXPR23 bool operator>(nullptr_t, const unique_ptr<_Ty, _Dx>& _Right) {
return _Right < nullptr;
}

_EXPORT_STD template <class _Ty, class _Dx>
_NODISCARD _CONSTEXPR23 bool operator<=(const unique_ptr<_Ty, _Dx>& _Left, nullptr_t _Right) {
return !(_Right < _Left);
_NODISCARD _CONSTEXPR23 bool operator<=(const unique_ptr<_Ty, _Dx>& _Left, nullptr_t) {
return !(nullptr < _Left);
}

_EXPORT_STD template <class _Ty, class _Dx>
_NODISCARD _CONSTEXPR23 bool operator<=(nullptr_t _Left, const unique_ptr<_Ty, _Dx>& _Right) {
return !(_Right < _Left);
_NODISCARD _CONSTEXPR23 bool operator<=(nullptr_t, const unique_ptr<_Ty, _Dx>& _Right) {
return !(_Right < nullptr);
}

#if _HAS_CXX20
Expand Down
10 changes: 4 additions & 6 deletions stl/inc/ranges
Original file line number Diff line number Diff line change
Expand Up @@ -146,36 +146,34 @@ namespace ranges {
void operator()(auto&&) && = delete;
void operator()(auto&&) const&& = delete;

// TRANSITION, DevCom-10519736, explicit `this->` shouldn't be needed.

template <class _Ty>
_NODISCARD constexpr decltype(auto) operator()(_Ty && _Val) & noexcept(
noexcept(_Right(_Left(_STD forward<_Ty>(_Val)))))
requires requires { this->_Right(this->_Left(_STD forward<_Ty>(_Val))); }
requires requires { _Right(_Left(_STD forward<_Ty>(_Val))); }
{
return _Right(_Left(_STD forward<_Ty>(_Val)));
}

template <class _Ty>
_NODISCARD constexpr decltype(auto) operator()(_Ty && _Val) const& noexcept(
noexcept(_Right(_Left(_STD forward<_Ty>(_Val)))))
requires requires { this->_Right(this->_Left(_STD forward<_Ty>(_Val))); }
requires requires { _Right(_Left(_STD forward<_Ty>(_Val))); }
{
return _Right(_Left(_STD forward<_Ty>(_Val)));
}

template <class _Ty>
_NODISCARD constexpr decltype(auto) operator()(_Ty && _Val) && noexcept(
noexcept(_STD move(_Right)(_STD move(_Left)(_STD forward<_Ty>(_Val)))))
requires requires { _STD move(this->_Right)(_STD move(this->_Left)(_STD forward<_Ty>(_Val))); }
requires requires { _STD move(_Right)(_STD move(_Left)(_STD forward<_Ty>(_Val))); }
{
return _STD move(_Right)(_STD move(_Left)(_STD forward<_Ty>(_Val)));
}

template <class _Ty>
_NODISCARD constexpr decltype(auto) operator()(_Ty && _Val) const&& noexcept(
noexcept(_STD move(_Right)(_STD move(_Left)(_STD forward<_Ty>(_Val)))))
requires requires { _STD move(this->_Right)(_STD move(this->_Left)(_STD forward<_Ty>(_Val))); }
requires requires { _STD move(_Right)(_STD move(_Left)(_STD forward<_Ty>(_Val))); }
{
return _STD move(_Right)(_STD move(_Left)(_STD forward<_Ty>(_Val)));
}
Expand Down
26 changes: 1 addition & 25 deletions stl/inc/type_traits
Original file line number Diff line number Diff line change
Expand Up @@ -1409,33 +1409,9 @@ struct _Add_qualifiers<_Ty1&&> {
using _Apply = add_rvalue_reference_t<_Copy_cv<_Ty1, _Ty2>>;
};

#if !defined(__clang__) && !defined(__EDG__) // TRANSITION, DevCom-10095944
template <class _Ty1, class _Ty2>
using _Cond_res_if_right = // N4950 [meta.trans.other]/2.4
decltype(false ? _Returns_exactly<_Ty1>() : _Returns_exactly<_Ty2>());

template <class _Ty>
using _Is_scalar_or_array = disjunction<is_scalar<_Ty>, is_array<_Ty>>;

template <class _Ty1, class _Ty2, class = void>
struct _Cond_res_workaround {};

template <class _Ty1, class _Ty2>
struct _Cond_res_workaround<_Ty1, _Ty2, void_t<_Cond_res_if_right<_Ty1, _Ty2>>> {
using _Uty = remove_cvref_t<_Ty1>;
using type = conditional_t<conjunction_v<is_same<_Uty, remove_cvref_t<_Ty2>>, _Is_scalar_or_array<_Uty>,
disjunction<conjunction<is_lvalue_reference<_Ty1>, is_rvalue_reference<_Ty2>>,
conjunction<is_rvalue_reference<_Ty1>, is_lvalue_reference<_Ty2>>>>,
decay_t<_Copy_cv<remove_reference_t<_Ty1>, remove_reference_t<_Ty2>>>, _Cond_res_if_right<_Ty1, _Ty2>>;
};

template <class _Ty1, class _Ty2>
using _Cond_res = _Cond_res_workaround<_Ty1, _Ty2>::type;
#else // ^^^ workaround / no workaround vvv
template <class _Ty1, class _Ty2>
using _Cond_res = // N4950 [meta.trans.other]/2.4
decltype(false ? _Returns_exactly<_Ty1>() : _Returns_exactly<_Ty2>());
#endif // ^^^ no workaround ^^^

_EXPORT_STD template <class...>
struct common_reference;
Expand Down Expand Up @@ -1746,7 +1722,7 @@ constexpr auto invoke(_Callable&& _Obj, _Ty1&& _Arg1, _Types2&&... _Args2) noexc
} else if constexpr (_Invoker1<_Callable, _Ty1>::_Strategy == _Invoker_strategy::_Pmd_object) {
return static_cast<_Ty1&&>(_Arg1).*_Obj;
} else if constexpr (_Invoker1<_Callable, _Ty1>::_Strategy == _Invoker_strategy::_Pmd_refwrap) {
#if defined(__clang__) || defined(__EDG__) // TRANSITION, DevCom-10543093
#if defined(__clang__) || defined(__EDG__) // TRANSITION, VSO-1956799
return _Arg1.get().*_Obj;
#else // ^^^ no workaround / workaround vvv
auto& _Ref = _Arg1.get();
Expand Down
Loading