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
34 changes: 22 additions & 12 deletions stl/inc/ranges
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ namespace ranges {
// clang-format off
template <class _Other>
requires _Can_compose<_Derived, const _Other&>
constexpr auto operator|(const _Base<_Other>& __r) && noexcept(noexcept(
_Pipeline{static_cast<_Derived&&>(*this), static_cast<const _Other&>(__r)})) {
constexpr auto operator|(const _Base<_Other>& __r) && noexcept(
noexcept(_Pipeline{static_cast<_Derived&&>(*this), static_cast<const _Other&>(__r)})) {
// clang-format on
_STL_INTERNAL_STATIC_ASSERT(derived_from<_Derived, _Base<_Derived>>);
_STL_INTERNAL_STATIC_ASSERT(derived_from<_Other, _Base<_Other>>);
Expand All @@ -109,23 +109,33 @@ namespace ranges {
// clang-format off
template <class _Other>
requires _Can_compose<const _Derived&, const _Other&>
constexpr auto operator|(const _Base<_Other>& __r) const& noexcept(noexcept(
_Pipeline{static_cast<const _Derived&>(*this), static_cast<const _Other&>(__r)})) {
constexpr auto operator|(const _Base<_Other>& __r) const& noexcept(
noexcept(_Pipeline{static_cast<const _Derived&>(*this), static_cast<const _Other&>(__r)})) {
// clang-format on
_STL_INTERNAL_STATIC_ASSERT(derived_from<_Derived, _Base<_Derived>>);
_STL_INTERNAL_STATIC_ASSERT(derived_from<_Other, _Base<_Other>>);
return _Pipeline{static_cast<const _Derived&>(*this), static_cast<const _Other&>(__r)};
}

template <_Can_pipe<const _Derived&> _Left>
friend constexpr auto operator|(_Left&& __l, const _Base& __r) noexcept(
noexcept(static_cast<const _Derived&>(__r)(_STD forward<_Left>(__l)))) {
friend constexpr auto operator|(_Left&& __l, const _Base& __r)
#ifdef __EDG__ // TRANSITION, VSO-1222776
noexcept(noexcept(_STD declval<const _Derived&>()(_STD forward<_Left>(__l))))
#else // ^^^ workaround / no workaround vvv
noexcept(noexcept(static_cast<const _Derived&>(__r)(_STD forward<_Left>(__l))))
#endif // TRANSITION, VSO-1222776
{
return static_cast<const _Derived&>(__r)(_STD forward<_Left>(__l));
}

template <_Can_pipe<_Derived> _Left>
friend constexpr auto operator|(_Left&& __l, _Base&& __r) noexcept(
noexcept(static_cast<_Derived&&>(__r)(_STD forward<_Left>(__l)))) {
friend constexpr auto operator|(_Left&& __l, _Base&& __r)
#ifdef __EDG__ // TRANSITION, VSO-1222776
noexcept(noexcept(_STD declval<_Derived>()(_STD forward<_Left>(__l))))
#else // ^^^ workaround / no workaround vvv
noexcept(noexcept(static_cast<_Derived&&>(__r)(_STD forward<_Left>(__l))))
#endif // TRANSITION, VSO-1222776
{
return static_cast<_Derived&&>(__r)(_STD forward<_Left>(__l));
}
};
Expand Down Expand Up @@ -432,9 +442,9 @@ namespace ranges {
public:
using optional<_Ty>::optional;

_Semiregular_box_copy() = default;
_Semiregular_box_copy() = default;
_Semiregular_box_copy(const _Semiregular_box_copy&) = default;
_Semiregular_box_copy(_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(
Expand All @@ -459,9 +469,9 @@ namespace ranges {
public:
using _Choose_semiregular_box_copy<_Ty>::_Choose_semiregular_box_copy;

_Semiregular_box_move() = default;
_Semiregular_box_move() = default;
_Semiregular_box_move(const _Semiregular_box_move&) = default;
_Semiregular_box_move(_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>) {
Expand Down
8 changes: 4 additions & 4 deletions stl/inc/xutility
Original file line number Diff line number Diff line change
Expand Up @@ -4117,22 +4117,22 @@ public:
}

_NODISCARD friend constexpr reference iter_move(const move_iterator& _It)
#ifdef __EDG__ // TRANSITION, VSO-1132105
#ifdef __EDG__ // TRANSITION, VSO-1222776
noexcept(noexcept(_RANGES iter_move(_STD declval<const _Iter&>())))
#else // ^^^ workaround / no workaround vvv
noexcept(noexcept(_RANGES iter_move(_It._Current)))
#endif // TRANSITION, VSO-1132105
#endif // TRANSITION, VSO-1222776
{
return _RANGES iter_move(_It._Current);
}

template <indirectly_swappable<_Iter> _Iter2>
friend constexpr void iter_swap(const move_iterator& _Left, const move_iterator<_Iter2>& _Right)
#ifdef __EDG__ // TRANSITION, VSO-1132105
#ifdef __EDG__ // TRANSITION, VSO-1222776
noexcept(noexcept(_RANGES iter_swap(_STD declval<const _Iter&>(), _STD declval<const _Iter2&>())))
#else // ^^^ workaround / no workaround vvv
noexcept(noexcept(_RANGES iter_swap(_Left._Current, _Right.base())))
#endif // TRANSITION, VSO-1132105
#endif // TRANSITION, VSO-1222776
{
_RANGES iter_swap(_Left._Current, _Right.base());
}
Expand Down