Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: microsoft/STL
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: fafd5d018e82160e7ff2118043a3f522bba62b33
Choose a base ref
..
head repository: microsoft/STL
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8a7b0a1a7d21a2f15f26cad28dd9ff3860ac7b9f
Choose a head ref
Showing with 4 additions and 4 deletions.
  1. +2 −2 stl/inc/expected
  2. +2 −2 tests/std/tests/P0323R12_expected/test.cpp
4 changes: 2 additions & 2 deletions stl/inc/expected
Original file line number Diff line number Diff line change
@@ -376,8 +376,8 @@ public:

// clang-format off
template <class _Uty = _Ty>
requires (!is_same_v<remove_cvref_t<_Uty>, expected> && !_Is_specialization_v<remove_cvref_t<_Uty>, unexpected> //
&& is_constructible_v<_Ty, _Uty> && is_assignable_v<_Ty&, _Uty> && (is_nothrow_constructible_v<_Ty, _Uty> //
requires (!is_same_v<remove_cvref_t<_Uty>, expected> && !_Is_specialization_v<remove_cvref_t<_Uty>, unexpected>
&& is_constructible_v<_Ty, _Uty> && is_assignable_v<_Ty&, _Uty> && (is_nothrow_constructible_v<_Ty, _Uty>
|| is_nothrow_move_constructible_v<_Ty> || is_nothrow_move_constructible_v<_Err>))
constexpr expected& operator=(_Uty&& _Other) noexcept(
is_nothrow_constructible_v<_Ty, _Uty>&& is_nothrow_assignable_v<_Ty&, _Uty>) { // strengthened
4 changes: 2 additions & 2 deletions tests/std/tests/P0323R12_expected/test.cpp
Original file line number Diff line number Diff line change
@@ -464,7 +464,7 @@ namespace test_expected {
static_assert(is_convertible_v<const Input&, Expected> != should_be_explicit);
static_assert(is_convertible_v<Input, Expected> != should_be_explicit);

const Input const_input_value{in_place};
const Input const_input_value{};
const Expected copy_constructed_value{const_input_value};
assert(copy_constructed_value);
assert(copy_constructed_value.value() == 3);
@@ -482,7 +482,7 @@ namespace test_expected {
static_assert(is_convertible_v<const Input&, Expected> != should_be_explicit);
static_assert(is_convertible_v<Input, Expected> != should_be_explicit);

const Input const_input_value{in_place};
const Input const_input_value{};
const Expected copy_constructed_value{const_input_value};
assert(copy_constructed_value);
assert(copy_constructed_value.value() == 3);