Index: libcxx/test/std/utilities/expected/expected.expected/ctor/ctor.inplace.pass.cpp =================================================================== --- libcxx/test/std/utilities/expected/expected.expected/ctor/ctor.inplace.pass.cpp +++ libcxx/test/std/utilities/expected/expected.expected/ctor/ctor.inplace.pass.cpp @@ -101,9 +101,9 @@ // multi args { - std::expected, int> e(std::in_place, 1, 2, MoveOnly(3)); + std::expected, int> e(std::in_place, 1, short{2}, MoveOnly(3)); assert(e.has_value()); - assert((e.value() == std::tuple(1, 2, MoveOnly(3)))); + assert((e.value() == std::tuple(1, short{2}, MoveOnly(3)))); } return true; Index: libcxx/test/std/utilities/expected/expected.expected/ctor/ctor.unexpect.pass.cpp =================================================================== --- libcxx/test/std/utilities/expected/expected.expected/ctor/ctor.unexpect.pass.cpp +++ libcxx/test/std/utilities/expected/expected.expected/ctor/ctor.unexpect.pass.cpp @@ -101,9 +101,9 @@ // multi args { - std::expected> e(std::unexpect, 1, 2, MoveOnly(3)); + std::expected> e(std::unexpect, 1, short{2}, MoveOnly(3)); assert(!e.has_value()); - assert((e.error() == std::tuple(1, 2, MoveOnly(3)))); + assert((e.error() == std::tuple(1, short{2}, MoveOnly(3)))); } return true; Index: libcxx/test/std/utilities/expected/expected.expected/observers/value.pass.cpp =================================================================== --- libcxx/test/std/utilities/expected/expected.expected/observers/value.pass.cpp +++ libcxx/test/std/utilities/expected/expected.expected/observers/value.pass.cpp @@ -68,7 +68,7 @@ { const std::expected e(std::unexpect, 5); try { - e.value(); + (void) e.value(); assert(false); } catch (const std::bad_expected_access& ex) { assert(ex.error() == 5); @@ -79,7 +79,7 @@ { std::expected e(std::unexpect, 5); try { - std::move(e).value(); + (void) std::move(e).value(); assert(false); } catch (const std::bad_expected_access& ex) { assert(ex.error() == 5); Index: libcxx/test/std/utilities/expected/expected.expected/observers/value_or.pass.cpp =================================================================== --- libcxx/test/std/utilities/expected/expected.expected/observers/value_or.pass.cpp +++ libcxx/test/std/utilities/expected/expected.expected/observers/value_or.pass.cpp @@ -51,37 +51,8 @@ return true; } -void testException() { -#ifndef TEST_HAS_NO_EXCEPTIONS - - // int - { - const std::expected e(std::unexpect, 5); - try { - e.value(); - assert(false); - } catch (const std::bad_expected_access& ex) { - assert(ex.error() == 5); - } - } - - // MoveOnly - { - std::expected e(std::unexpect, 5); - try { - std::move(e).value(); - assert(false); - } catch (const std::bad_expected_access& ex) { - assert(ex.error() == 5); - } - } - -#endif // TEST_HAS_NO_EXCEPTIONS -} - int main(int, char**) { test(); static_assert(test()); - testException(); return 0; } Index: libcxx/test/std/utilities/expected/expected.void/ctor/ctor.unexpect.pass.cpp =================================================================== --- libcxx/test/std/utilities/expected/expected.void/ctor/ctor.unexpect.pass.cpp +++ libcxx/test/std/utilities/expected/expected.void/ctor/ctor.unexpect.pass.cpp @@ -101,9 +101,9 @@ // multi args { - std::expected> e(std::unexpect, 1, 2, MoveOnly(3)); + std::expected> e(std::unexpect, 1, short{2}, MoveOnly(3)); assert(!e.has_value()); - assert((e.error() == std::tuple(1, 2, MoveOnly(3)))); + assert((e.error() == std::tuple(1, short{2}, MoveOnly(3)))); } return true;