@@ -2476,24 +2476,17 @@ static_assert(test_inherited_constructors());
2476
2476
template <class T , class E >
2477
2477
struct ambiguating_expected_copy_constructor_caller {
2478
2478
struct const_lvalue_taker {
2479
- const_lvalue_taker (const expected<T, E>&) {}
2479
+ const_lvalue_taker (const expected<T, E>&);
2480
2480
};
2481
2481
2482
- void operator ()(expected<T, E>) {}
2483
- void operator ()(const_lvalue_taker) {}
2482
+ void operator ()(expected<T, E>);
2483
+ void operator ()(const_lvalue_taker);
2484
2484
};
2485
2485
2486
2486
template <class T , class E >
2487
2487
struct ambiguating_expected_assignment_source {
2488
- operator const expected<T, E>&() && {
2489
- return ex;
2490
- }
2491
-
2492
- operator expected<T, E>&&() && {
2493
- return move (ex);
2494
- }
2495
-
2496
- expected<T, E> ex;
2488
+ operator const expected<T, E>&() &&;
2489
+ operator expected<T, E>&&() &&;
2497
2490
};
2498
2491
2499
2492
struct move_only {
@@ -2512,9 +2505,9 @@ static_assert(
2512
2505
#ifndef __EDG__ // TRANSITION, VSO-1601179
2513
2506
static_assert (!is_assignable_v<expected<int , char >&, ambiguating_expected_assignment_source<int , char >>);
2514
2507
static_assert (!is_assignable_v<expected<void , int >&, ambiguating_expected_assignment_source<void , int >>);
2515
- #endif // ^^^ no workaround ^^^
2516
2508
static_assert (!is_assignable_v<expected<move_only, char >&, ambiguating_expected_assignment_source<move_only, char >>);
2517
2509
static_assert (!is_assignable_v<expected<void , move_only>&, ambiguating_expected_assignment_source<void , move_only>>);
2510
+ #endif // ^^^ no workaround ^^^
2518
2511
2519
2512
static_assert (test_lwg_3886());
2520
2513
0 commit comments