diff options
Diffstat (limited to 'libstdc++-v3/testsuite/20_util/expected/swap.cc')
-rw-r--r-- | libstdc++-v3/testsuite/20_util/expected/swap.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libstdc++-v3/testsuite/20_util/expected/swap.cc b/libstdc++-v3/testsuite/20_util/expected/swap.cc index 1b3b8c5f4e8..745db65fc6c 100644 --- a/libstdc++-v3/testsuite/20_util/expected/swap.cc +++ b/libstdc++-v3/testsuite/20_util/expected/swap.cc @@ -27,19 +27,19 @@ test_swap() VERIFY( e3.error() == 4 ); VERIFY( e4.error() == 3 ); - std::expected<int, int> v1(1), v2(2); - std::expected<int, int> v3(std::unexpect, 3), v4(std::unexpect, 4); + std::expected<void, int> v1, v2; + std::expected<void, int> v3(std::unexpect, 3), v4(std::unexpect, 4); swap(v1, v2); - VERIFY( v1.value() == 2 ); - VERIFY( v2.value() == 1 ); + VERIFY( v1.has_value() ); + VERIFY( v2.has_value() ); swap(v1, v3); VERIFY( ! v1.has_value() ); VERIFY( v1.error() == 3 ); - VERIFY( v3.value() == 2 ); + VERIFY( v3.has_value() ); swap(v1, v3); VERIFY( ! v3.has_value() ); - VERIFY( v1.value() == 2 ); + VERIFY( v1.has_value() ); VERIFY( v3.error() == 3 ); swap(v3, v4); VERIFY( ! v3.has_value() ); |