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
8 changes: 0 additions & 8 deletions stl/inc/optional
Original file line number Diff line number Diff line change
Expand Up @@ -1009,16 +1009,8 @@ _NODISCARD constexpr bool operator>=(const _Ty1& _Left, const optional<_Ty2>& _R
}

#if _HAS_CXX20
#ifndef __clang__ // TRANSITION, DevCom-10880933 (EDG) and VSO-2444237 (MSVC)
template <class _Ty>
void _Derived_from_optional_impl(const optional<_Ty>&);

template <class _Ty>
concept _Derived_from_optional = requires(const _Ty& __obj) { _STD _Derived_from_optional_impl(__obj); };
#else // ^^^ workaround / no workaround vvv
template <class _Ty>
concept _Derived_from_optional = requires(const _Ty& __obj) { []<class _Uty>(const optional<_Uty>&) {}(__obj); };
Comment thread
StephanTLavavej marked this conversation as resolved.
Resolved
#endif // ^^^ no workaround ^^^

_EXPORT_STD template <class _Ty1, class _Ty2>
requires (!_Derived_from_optional<_Ty2>) && three_way_comparable_with<_Ty1, _Ty2>
Expand Down
8 changes: 0 additions & 8 deletions stl/inc/ranges
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,9 @@ namespace ranges {
template <sized_range _Ty>
constexpr auto _Compile_time_max_size<_Ty> = (numeric_limits<range_size_t<_Ty>>::max)();

#ifdef __EDG__ // TRANSITION, VSO-1898880
template <class _Ty>
concept _Constant_sized_range = sized_range<_Ty> && requires { typename _Require_constant<_Ty::size()>; };

template <_Constant_sized_range _Ty>
constexpr auto _Compile_time_max_size<_Ty> = _Ty::size();
#else // ^^^ workaround / no workaround vvv
template <sized_range _Ty>
requires requires { typename _Require_constant<_Ty::size()>; }
constexpr auto _Compile_time_max_size<_Ty> = _Ty::size();
#endif // ^^^ no workaround ^^^

template <class _Ty, size_t _Size>
constexpr auto _Compile_time_max_size<_Ty[_Size]> = _Size;
Expand Down
24 changes: 2 additions & 22 deletions stl/inc/tuple
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,6 @@ template <class... _Types, class _Other, size_t... _Indices>
constexpr bool _Can_construct_values_from_tuple_like_v<tuple<_Types...>, _Other, index_sequence<_Indices...>> =
conjunction_v<is_constructible<_Types, decltype(_STD get<_Indices>(_STD declval<_Other>()))>...>;

#ifdef __EDG__ // TRANSITION, VSO-1900279
template <class _TupleLike, class _Tuple>
concept _Can_construct_from_tuple_like = _Different_from<_TupleLike, _Tuple> && _Tuple_like_non_subrange<_TupleLike>
&& (tuple_size_v<_Tuple> == tuple_size_v<remove_cvref_t<_TupleLike>>)
&& _Can_construct_values_from_tuple_like_v<_Tuple, _TupleLike>
&& (tuple_size_v<_Tuple> != 1
|| (!is_convertible_v<_TupleLike, tuple_element_t<0, _Tuple>>
&& !is_constructible_v<tuple_element_t<0, _Tuple>, _TupleLike>) );
#endif // ^^^ workaround ^^^

template <class _TTuple, class _UTuple, class _Indices = make_index_sequence<tuple_size_v<_UTuple>>>
struct _Three_way_comparison_result_with_tuple_like {};

Expand Down Expand Up @@ -477,17 +467,12 @@ public:
negation_v<conjunction<is_convertible<decltype(_STD get<0>(_STD declval<_Other>())), _This>,
is_convertible<decltype(_STD get<_Indices + 1>(_STD declval<_Other>())), _Rest>...>>;

#ifdef __EDG__ // TRANSITION, VSO-1900279
template <class _Other, enable_if_t<_Can_construct_from_tuple_like<_Other, tuple>, int> = 0>
#else // ^^^ workaround / no workaround vvv
template <_Different_from<tuple> _Other>
requires _Tuple_like_non_subrange<_Other> && (1 + sizeof...(_Rest) == tuple_size_v<remove_cvref_t<_Other>>)
&& _Can_construct_values_from_tuple_like_v<tuple, _Other>
&& (sizeof...(_Rest) != 0 || (!is_convertible_v<_Other, _This> && !is_constructible_v<_This, _Other>) )
#endif // ^^^ no workaround ^^^
constexpr explicit(_Is_tuple_like_constructor_explicit_v<_Other>) tuple(_Other&& _Right)
: tuple(_Unpack_tuple_t{}, _STD forward<_Other>(_Right)) {
}
: tuple(_Unpack_tuple_t{}, _STD forward<_Other>(_Right)) {}
template <_Different_from<tuple> _Other>
requires _Tuple_like_non_subrange<_Other> && (1 + sizeof...(_Rest) == tuple_size_v<remove_cvref_t<_Other>>)
&& _Can_construct_values_from_tuple_like_v<tuple, _Other>
Expand Down Expand Up @@ -650,18 +635,13 @@ public:
explicit(_Tuple_conditional_explicit_v<tuple, const _First, const _Second>)
tuple(allocator_arg_t, const _Alloc&, const pair<_First, _Second>&&) = delete;

#ifdef __EDG__ // TRANSITION, VSO-1900279
template <class _Alloc, class _Other, enable_if_t<_Can_construct_from_tuple_like<_Other, tuple>, int> = 0>
#else // ^^^ workaround / no workaround vvv
template <class _Alloc, _Different_from<tuple> _Other>
requires _Tuple_like_non_subrange<_Other> && (1 + sizeof...(_Rest) == tuple_size_v<remove_cvref_t<_Other>>)
&& _Can_construct_values_from_tuple_like_v<tuple, _Other>
&& (sizeof...(_Rest) != 0 || (!is_convertible_v<_Other, _This> && !is_constructible_v<_This, _Other>) )
#endif // ^^^ no workaround ^^^
constexpr explicit(_Is_tuple_like_constructor_explicit_v<_Other>)
tuple(allocator_arg_t, const _Alloc& _Al, _Other&& _Right)
: tuple(_Alloc_unpack_tuple_t{}, _Al, _STD forward<_Other>(_Right)) {
}
: tuple(_Alloc_unpack_tuple_t{}, _Al, _STD forward<_Other>(_Right)) {}
template <class _Alloc, _Different_from<tuple> _Other>
requires _Tuple_like_non_subrange<_Other> && (1 + sizeof...(_Rest) == tuple_size_v<remove_cvref_t<_Other>>)
&& _Can_construct_values_from_tuple_like_v<tuple, _Other>
Expand Down
14 changes: 1 addition & 13 deletions stl/inc/utility
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,6 @@ concept _Tuple_like = _Tuple_like_non_subrange<_Ty> || _Is_subrange_v<remove_cvr

template <class _Ty>
concept _Pair_like_non_subrange = _Tuple_like_non_subrange<_Ty> && tuple_size_v<remove_cvref_t<_Ty>> == 2;

#ifdef __EDG__ // TRANSITION, VSO-1900279
template <class _PairLike, class _Ty1, class _Ty2>
concept _Can_construct_from_pair_like =
_Pair_like_non_subrange<_PairLike> && is_constructible_v<_Ty1, decltype(_STD get<0>(_STD declval<_PairLike>()))>
&& is_constructible_v<_Ty2, decltype(_STD get<1>(_STD declval<_PairLike>()))>;
#endif // ^^^ workaround ^^^
#endif // _HAS_CXX23
#endif // _HAS_CXX20

Expand Down Expand Up @@ -349,19 +342,14 @@ struct pair { // store a pair of values
explicit(!conjunction_v<is_convertible<const _Other1, _Ty1>, is_convertible<const _Other2, _Ty2>>)
pair(const pair<_Other1, _Other2>&&) = delete;

#ifdef __EDG__ // TRANSITION, VSO-1900279
template <class _Other, enable_if_t<_Can_construct_from_pair_like<_Other, _Ty1, _Ty2>, int> = 0>
#else // ^^^ workaround / no workaround vvv
template <_Pair_like_non_subrange _Other>
requires conjunction_v<is_constructible<_Ty1, decltype(_STD get<0>(_STD declval<_Other>()))>,
is_constructible<_Ty2, decltype(_STD get<1>(_STD declval<_Other>()))>>
#endif // ^^^ no workaround ^^^
constexpr explicit(!conjunction_v<is_convertible<decltype(_STD get<0>(_STD declval<_Other>())), _Ty1>,
is_convertible<decltype(_STD get<1>(_STD declval<_Other>())), _Ty2>>) pair(_Other&& _Right)
noexcept(is_nothrow_constructible_v<_Ty1, decltype(_STD get<0>(_STD declval<_Other>()))>
&& is_nothrow_constructible_v<_Ty2, decltype(_STD get<1>(_STD declval<_Other>()))>) // strengthened
: first(_STD get<0>(_STD forward<_Other>(_Right))), second(_STD get<1>(_STD forward<_Other>(_Right))) {
}
: first(_STD get<0>(_STD forward<_Other>(_Right))), second(_STD get<1>(_STD forward<_Other>(_Right))) {}
template <_Pair_like_non_subrange _Other>
requires conjunction_v<is_constructible<_Ty1, decltype(_STD get<0>(_STD declval<_Other>()))>,
is_constructible<_Ty2, decltype(_STD get<1>(_STD declval<_Other>()))>>
Expand Down
2 changes: 0 additions & 2 deletions tests/std/tests/P0009R18_mdspan_default_accessor/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ constexpr bool test() {
}

int main() {
#if !(defined(_DEBUG) && defined(__EDG__)) // TRANSITION, VSO-1898962
static_assert(test());
#endif // ^^^ no workaround ^^^
test();
}
2 changes: 0 additions & 2 deletions tests/std/tests/P0896R4_and_P1614R2_comparisons/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,7 @@ STATIC_ASSERT(test_compare_three_way<int, long, strong_ordering>());
STATIC_ASSERT(test_compare_three_way<float, float, partial_ordering>());
STATIC_ASSERT(test_compare_three_way<float, double, partial_ordering>());
STATIC_ASSERT(test_compare_three_way<long, double, partial_ordering>());
#ifndef __EDG__ // TRANSITION, VSO-1898915
STATIC_ASSERT(test_compare_three_way<bool, int, void>());
#endif // ^^^ no workaround ^^^

STATIC_ASSERT(test_compare_three_way<some_enum, some_enum, strong_ordering>());
STATIC_ASSERT(test_compare_three_way<some_enum, int, void>());
Expand Down
6 changes: 0 additions & 6 deletions tests/std/tests/P0898R3_concepts/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1475,13 +1475,9 @@ namespace test_default_initializable {
using std::default_initializable, std::initializer_list;

static_assert(default_initializable<int>);
#ifndef __EDG__ // TRANSITION, VSO-1898941
static_assert(!default_initializable<int const>);
#endif // ^^^ no workaround ^^^
static_assert(default_initializable<int volatile>);
#ifndef __EDG__ // TRANSITION, VSO-1898941
static_assert(!default_initializable<int const volatile>);
#endif // ^^^ no workaround ^^^
static_assert(default_initializable<double>);
static_assert(!default_initializable<void>);

Expand All @@ -1494,9 +1490,7 @@ namespace test_default_initializable {
static_assert(!default_initializable<int[]>);
static_assert(!default_initializable<char[]>);
static_assert(!default_initializable<char[][3]>);
#ifndef __EDG__ // TRANSITION, VSO-1898941
static_assert(!default_initializable<int const[2]>);
#endif // ^^^ no workaround ^^^

static_assert(!default_initializable<int&>);
static_assert(!default_initializable<int const&>);
Expand Down
4 changes: 2 additions & 2 deletions tests/std/tests/P2278R4_views_as_const/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ using move_only_view = test::range<Category, const int, test::Sized{is_random},
test::CanView::yes, test::Copyability::move_only>;

int main() {
#if !defined(__clang__) && !defined(__EDG__) // TRANSITION, GH-6295 (Clang, not yet investigated) and VSO-1901430 (EDG)
#if !defined(__clang__) // TRANSITION, GH-6295 (Clang, not yet investigated)
{ // Validate views
// ... copyable
constexpr span<const int> s{some_ints};
Expand Down Expand Up @@ -694,7 +694,7 @@ int main() {
test_one(as_const(views::empty<const volatile int>), empty_arr);
}

#if !defined(__clang__) && !defined(__EDG__) // TRANSITION, GH-6295 (Clang, not yet investigated) and VSO-1901430 (EDG)
#if !defined(__clang__) // TRANSITION, GH-6295 (Clang, not yet investigated)
{ // empty range
using Span = span<int>;
static_assert(test_one(Span{}, Span{}));
Expand Down
2 changes: 0 additions & 2 deletions tests/std/tests/P2322R6_ranges_alg_fold/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,7 @@ int main() {
static_assert((test_bidi<instantiator, const double>(), true));
test_bidi<instantiator, const double>();

#if !(defined(_DEBUG) && defined(__EDG__)) // TRANSITION, VSO-1949414, see also GH-1566
static_assert(instantiator::non_dependent());
#endif // ^^^ no workaround ^^^
instantiator::non_dependent();

static_assert(test_in_value_result());
Expand Down
6 changes: 0 additions & 6 deletions tests/std/tests/P2374R4_views_cartesian_product/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -862,9 +862,7 @@ struct instantiator {
template <class R>
static constexpr void call() {
typename R::template type<const int> r0{get<0>(some_ranges)};
#ifndef __EDG__ // TRANSITION, VSO-1900293
test_one(expected_result_0, r0);
#endif // ^^^ no workaround ^^^

if constexpr (ranges::forward_range<typename R::template type<const int>>) {
typename R::template type<const int> r1{get<1>(some_ranges)};
Expand Down Expand Up @@ -951,7 +949,6 @@ constexpr void test_gh_4425() {

int main() {
// Check views
#ifndef __EDG__ // TRANSITION, VSO-1900293
{ // ... copyable
constexpr span<const int> s{get<0>(some_ranges)};
static_assert(test_one(expected_result_0, s));
Expand All @@ -963,7 +960,6 @@ int main() {
span<int> s{arr};
test_one(expected_result_0, s);
}
#endif // ^^^ no workaround ^^^

{ // ... move-only
using test::Common, test::Sized;
Expand All @@ -990,10 +986,8 @@ int main() {
// Check non-views
{
constexpr auto& r0 = get<0>(some_ranges);
#ifndef __EDG__ // TRANSITION, VSO-1900293
static_assert(test_one(expected_result_0, r0));
test_one(expected_result_0, r0);
#endif // ^^^ no workaround ^^^

auto r1 = get<1>(some_ranges) | ranges::to<vector>();
test_one(expected_result_1, r0, r1);
Expand Down