Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
28 changes: 0 additions & 28 deletions stl/inc/functional
Original file line number Diff line number Diff line change
Expand Up @@ -747,20 +747,11 @@ struct _Invoker_ret { // selected for _Rx being cv void

template <class _Rx>
struct _Invoker_ret<_Rx, false> { // selected for all _Rx other than cv void and _Unforced
#ifdef __EDG__ // TRANSITION, VSO-1132186
template <class _Fx, class... _Valtys,
template <class> class _Is_nothrow = _Select_invoke_traits<_Fx, _Valtys...>::template _Is_nothrow_invocable_r>
static _CONSTEXPR20 _Rx _Call(_Fx&& _Func, _Valtys&&... _Vals) noexcept(_Is_nothrow<_Rx>::value) {
// INVOKE, implicitly converted to _Rx
return _STD invoke(static_cast<_Fx&&>(_Func), static_cast<_Valtys&&>(_Vals)...);
}
#else // ^^^ workaround / no workaround vvv
template <class _Fx, class... _Valtys>
static _CONSTEXPR20 _Rx _Call(_Fx&& _Func, _Valtys&&... _Vals) noexcept(_Select_invoke_traits<_Fx,
_Valtys...>::template _Is_nothrow_invocable_r<_Rx>::value) { // INVOKE, implicitly converted to _Rx
return _STD invoke(static_cast<_Fx&&>(_Func), static_cast<_Valtys&&>(_Vals)...);
}
#endif // TRANSITION, VSO-1132186
};

template <>
Expand Down Expand Up @@ -1472,24 +1463,6 @@ public:
_Call_binder(_Invoker_ret<_Ret>{}, _Seq{}, _Mypair._Get_first(), _Mypair._Myval2, \
_STD forward_as_tuple(_STD forward<_Unbound>(_Unbargs)...))

#ifdef __EDG__ // TRANSITION, VSO-1132105
template <class... _Unbound>
_CONSTEXPR20 auto operator()(_Unbound&&... _Unbargs) noexcept(noexcept(_Call_binder(_Invoker_ret<_Ret>{}, _Seq{},
_STD declval<_First&>(), _STD declval<_Second&>(), _STD forward_as_tuple(_STD forward<_Unbound>(_Unbargs)...))))
-> decltype(_Call_binder(_Invoker_ret<_Ret>{}, _Seq{}, _STD declval<_First&>(), _STD declval<_Second&>(),
_STD forward_as_tuple(_STD forward<_Unbound>(_Unbargs)...))) {
return _CALL_BINDER;
}

template <class... _Unbound>
_CONSTEXPR20 auto operator()(_Unbound&&... _Unbargs) const
noexcept(noexcept(_Call_binder(_Invoker_ret<_Ret>{}, _Seq{}, _STD declval<const _First&>(),
_STD declval<const _Second&>(), _STD forward_as_tuple(_STD forward<_Unbound>(_Unbargs)...))))
-> decltype(_Call_binder(_Invoker_ret<_Ret>{}, _Seq{}, _STD declval<const _First&>(),
_STD declval<const _Second&>(), _STD forward_as_tuple(_STD forward<_Unbound>(_Unbargs)...))) {
return _CALL_BINDER;
}
#else // ^^^ workaround / no workaround vvv
template <class... _Unbound>
_CONSTEXPR20 auto operator()(_Unbound&&... _Unbargs) noexcept(noexcept(_CALL_BINDER)) -> decltype(_CALL_BINDER) {
return _CALL_BINDER;
Expand All @@ -1500,7 +1473,6 @@ public:
-> decltype(_CALL_BINDER) {
return _CALL_BINDER;
}
#endif // TRANSITION, VSO-1132105

#undef _CALL_BINDER
};
Expand Down
11 changes: 1 addition & 10 deletions stl/inc/iterator
Original file line number Diff line number Diff line change
Expand Up @@ -557,12 +557,10 @@ public:
}
}

#if 0 // TRANSITION, VSO-1174090
// clang-format off
_Variantish(const _Variantish&) requires is_trivially_copy_constructible_v<_It>
&& is_trivially_copy_constructible_v<_Se> = default;
// clang-format on
#endif // TRANSITION, VSO-1174090

_Variantish(const _Variantish& _That) noexcept(
noexcept(is_nothrow_copy_constructible_v<_It>&& is_nothrow_copy_constructible_v<_Se>))
Expand All @@ -579,12 +577,10 @@ public:
}
}

#if 0 // TRANSITION, VSO-1174090
// clang-format off
_Variantish(_Variantish&&) requires is_trivially_move_constructible_v<_It>
&& is_trivially_move_constructible_v<_Se> = default;
// clang-format on
#endif // TRANSITION, VSO-1174090

_Variantish(_Variantish&& _That) noexcept(
is_nothrow_move_constructible_v<_It>&& is_nothrow_move_constructible_v<_Se>)
Expand All @@ -601,16 +597,14 @@ public:
}
}

#if 0 // TRANSITION, VSO-1174090
// clang-format off
~_Variantish() requires is_trivially_destructible_v<_It> && is_trivially_destructible_v<_Se> = default;
// clang-format on
#endif // TRANSITION, VSO-1174090

~_Variantish() {
_Raw_clear();
}

#if 0 // TRANSITION, VSO-1174090
// clang-format off
_Variantish& operator=(const _Variantish&) requires is_trivially_destructible_v<_It>
&& is_trivially_destructible_v<_Se>
Expand All @@ -619,7 +613,6 @@ public:
&& is_trivially_copy_assignable_v<_It>
&& is_trivially_copy_assignable_v<_Se> = default;
// clang-format on
#endif // TRANSITION, VSO-1174090

_Variantish& operator=(const _Variantish& _That) noexcept(
is_nothrow_copy_constructible_v<_It>&& is_nothrow_copy_constructible_v<_Se>&&
Expand Down Expand Up @@ -657,7 +650,6 @@ public:
return *this;
}

#if 0 // TRANSITION, VSO-1174090
// clang-format off
_Variantish& operator=(_Variantish&&) requires is_trivially_destructible_v<_It>
&& is_trivially_destructible_v<_Se>
Expand All @@ -666,7 +658,6 @@ public:
&& is_trivially_move_assignable_v<_It>
&& is_trivially_move_assignable_v<_Se> = default;
// clang-format on
#endif // TRANSITION, VSO-1174090

_Variantish& operator=(_Variantish&& _That) noexcept(
is_nothrow_move_constructible_v<_It>&& is_nothrow_move_constructible_v<_Se>&&
Expand Down
100 changes: 0 additions & 100 deletions stl/inc/ranges
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
#include <span>
#include <string_view>

#if 1 // TRANSITION, VSO-1174090
#include <optional>
#endif // TRANSITION, VSO-1174090

#pragma pack(push, _CRT_PACKING)
#pragma warning(push, _STL_WARNING_LEVEL)
Expand Down Expand Up @@ -234,7 +231,6 @@ namespace ranges {
using _Cached_position_t = conditional_t<_Enable, _Cached_position<_Rng, _Derived>, view_interface<_Derived>>;

// CLASS TEMPLATE ranges::_Semiregular_box
#if 0 // TRANSITION, VSO-1174090
template <_Copy_constructible_object _Ty>
class _Semiregular_box {
public:
Expand Down Expand Up @@ -426,102 +422,6 @@ namespace ranges {
private:
/* [[no_unique_address]] */ _Ty _Val = _Ty();
};
#else // ^^^ no workaround / workaround vvv
template <class _Ty>
class _Semiregular_box_copy : public optional<_Ty> {
public:
using optional<_Ty>::optional;

_Semiregular_box_copy() = default;
_Semiregular_box_copy(const _Semiregular_box_copy&) = default;
_Semiregular_box_copy(_Semiregular_box_copy&&) = default;
_Semiregular_box_copy& operator=(_Semiregular_box_copy&&) = default;

_Semiregular_box_copy& operator=(const _Semiregular_box_copy& _That) noexcept(
is_nothrow_copy_constructible_v<_Ty>) {
if (_STD addressof(_That) != this) {
optional<_Ty>::reset();
if (_That) {
optional<_Ty>::emplace(*_That);
}
}

return *this;
}
};

template <class _Ty>
using _Choose_semiregular_box_copy =
conditional_t<assignable_from<_Ty&, const _Ty&>, optional<_Ty>, _Semiregular_box_copy<_Ty>>;

template <class _Ty>
class _Semiregular_box_move : public _Choose_semiregular_box_copy<_Ty> {
public:
using _Choose_semiregular_box_copy<_Ty>::_Choose_semiregular_box_copy;

_Semiregular_box_move() = default;
_Semiregular_box_move(const _Semiregular_box_move&) = default;
_Semiregular_box_move(_Semiregular_box_move&&) = default;
_Semiregular_box_move& operator=(const _Semiregular_box_move&) = default;

_Semiregular_box_move& operator=(_Semiregular_box_move&& _That) noexcept(is_nothrow_move_constructible_v<_Ty>) {
if (_STD addressof(_That) != this) {
optional<_Ty>::reset();
if (_That) {
optional<_Ty>::emplace(_STD move(*_That));
}
}

return *this;
}
};

template <class _Ty>
using _Choose_semiregular_box_move =
conditional_t<assignable_from<_Ty&, _Ty>, _Choose_semiregular_box_copy<_Ty>, _Semiregular_box_move<_Ty>>;

template <_Copy_constructible_object _Ty>
class _Semiregular_box : public _Choose_semiregular_box_move<_Ty> {
public:
constexpr _Semiregular_box() noexcept {}
constexpr _Semiregular_box() noexcept(
is_nothrow_default_constructible_v<_Ty>) requires default_initializable<_Ty>
: _Choose_semiregular_box_move<_Ty>{in_place} {}

template <class... _Types>
constexpr _Semiregular_box(in_place_t, _Types&&... _Args) noexcept(
is_nothrow_constructible_v<_Ty, _Types...>) // strengthened
: _Choose_semiregular_box_move<_Ty>{in_place, _STD forward<_Types>(_Args)...} {}
};

// clang-format off
template <_Copy_constructible_object _Ty>
requires default_initializable<_Ty> && copyable<_Ty>
class _Semiregular_box<_Ty> {
// clang-format on
public:
_Semiregular_box() = default;

template <class... _Types>
constexpr _Semiregular_box(in_place_t, _Types&&... _Args) noexcept(
is_nothrow_constructible_v<_Ty, _Types...>) // strengthened
: _Val(_STD forward<_Types>(_Args)...) {}

constexpr explicit operator bool() const noexcept {
return true;
}

_NODISCARD constexpr _Ty& operator*() noexcept {
return _Val;
}
_NODISCARD constexpr const _Ty& operator*() const noexcept {
return _Val;
}

private:
/* [[no_unique_address]] */ _Ty _Val = _Ty();
};
#endif // TRANSITION, VSO-1174090

// CLASS TEMPLATE ranges::empty_view
// clang-format off
Expand Down
4 changes: 2 additions & 2 deletions stl/inc/utility
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ _NODISCARD constexpr bool cmp_greater_equal(const _Ty1 _Left, const _Ty2 _Right)

// FUNCTION TEMPLATE in_range
template <class _Ty>
_NODISCARD constexpr _Ty _Min_limit() noexcept { // same as (numeric_limits<_Ty>::min)(), less throughput cost
_NODISCARD _CONSTEVAL _Ty _Min_limit() noexcept { // same as (numeric_limits<_Ty>::min)(), less throughput cost
static_assert(_Is_standard_integer<_Ty>); // doesn't attempt to handle all types
if constexpr (is_signed_v<_Ty>) {
constexpr auto _Unsigned_max = static_cast<make_unsigned_t<_Ty>>(-1);
Expand All @@ -708,7 +708,7 @@ _NODISCARD constexpr _Ty _Min_limit() noexcept { // same as (numeric_limits<_Ty>
}

template <class _Ty>
_NODISCARD constexpr _Ty _Max_limit() noexcept { // same as (numeric_limits<_Ty>::max)(), less throughput cost
_NODISCARD _CONSTEVAL _Ty _Max_limit() noexcept { // same as (numeric_limits<_Ty>::max)(), less throughput cost
static_assert(_Is_standard_integer<_Ty>); // doesn't attempt to handle all types
if constexpr (is_signed_v<_Ty>) {
constexpr auto _Unsigned_max = static_cast<make_unsigned_t<_Ty>>(-1);
Expand Down
18 changes: 4 additions & 14 deletions stl/inc/xutility
Original file line number Diff line number Diff line change
Expand Up @@ -474,21 +474,11 @@ concept _Cpp17_input_iterator = _Cpp17_iterator<_It>
requires signed_integral<typename incrementable_traits<_It>::difference_type>;
};

#if 1 // TRANSITION, VSO-1002863
template <class _Ty>
using _Member_iterator_category = typename _Ty::iterator_category;
#endif // TRANSITION, VSO-1002863

template <class _It>
requires (!_Has_iter_types<_It> && _Cpp17_iterator<_It> && !_Cpp17_input_iterator<_It>
// Implements the proposed resolution of LWG-3283:
#if 1 // TRANSITION, VSO-1002863
&& (!requires { typename _It::iterator_category; }
|| derived_from<_Member_iterator_category<_It>, output_iterator_tag>))
#else // ^^^ workaround / no workaround vvv
&& (!requires { typename _It::iterator_category; }
|| derived_from<typename _It::iterator_category, output_iterator_tag>))
#endif // TRANSITION, VSO-1002863
struct _Iterator_traits_base<_It> {
using iterator_category = output_iterator_tag;
using difference_type =
Expand Down Expand Up @@ -1494,20 +1484,20 @@ _INLINE_VAR constexpr bool
template <class _Iter, class _UIter>
constexpr void _Seek_wrapped(_Iter& _It, _UIter&& _UIt) {
if constexpr (_Wrapped_seekable_v<_Iter, _UIter>) {
_It._Seek_to(static_cast<_UIter&&>(_UIt));
_It._Seek_to(_STD forward<_UIter>(_UIt));
} else {
_It = static_cast<_UIter&&>(_UIt);
_It = _STD forward<_UIter>(_UIt);
}
}
#else // ^^^ _HAS_IF_CONSTEXPR / !_HAS_IF_CONSTEXPR vvv
template <class _Iter, class _UIter, enable_if_t<_Wrapped_seekable_v<_Iter, _UIter>, int> = 0>
constexpr void _Seek_wrapped(_Iter& _It, _UIter&& _UIt) {
_It._Seek_to(static_cast<_UIter&&>(_UIt));
_It._Seek_to(_STD forward<_UIter>(_UIt));
}

template <class _Iter, class _UIter, enable_if_t<!_Wrapped_seekable_v<_Iter, _UIter>, int> = 0>
constexpr void _Seek_wrapped(_Iter& _It, _UIter&& _UIt) {
_It = static_cast<_UIter&&>(_UIt);
_It = _STD forward<_UIter>(_UIt);
}

template <class _Ty>
Expand Down
2 changes: 0 additions & 2 deletions tests/std/tests/P0088R3_variant/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6485,7 +6485,6 @@ namespace msvc {

namespace derived_variant {
void run_test() {
#ifndef __EDG__ // TRANSITION, VSO-1178211
// Extension: std::visit accepts types derived from a specialization of variant.
{
struct my_variant : std::variant<int, char, double> {
Expand Down Expand Up @@ -6538,7 +6537,6 @@ namespace msvc {
} catch (std::bad_variant_access&) {
}
}
#endif // TRANSITION, VSO-1178211
}
} // namespace derived_variant

Expand Down
2 changes: 0 additions & 2 deletions tests/std/tests/P0896R4_P1614R2_comparisons/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,7 @@ constexpr void ordering_test_cases() {
test_strongly_ordered(13U, u8'x');
#endif // __cpp_char8_t
test_strongly_ordered(13U, u'x');
#if defined(__clang__) || defined(__EDG__) // TRANSITION, VSO-1062618
test_strongly_ordered(13U, U'x');
#endif // TRANSITION, VSO-1062618

test_strongly_ordered(scoped{13}, scoped{42});
test_strongly_ordered(unscoped{13}, unscoped{42});
Expand Down
Loading