diff --git a/test/cpp-utils/either_test.cpp b/test/cpp-utils/either_test.cpp index 6a208636..fb450130 100644 --- a/test/cpp-utils/either_test.cpp +++ b/test/cpp-utils/either_test.cpp @@ -98,9 +98,11 @@ std::vector&)>> EXPECT_IS_RIGHT(const Rig }, [&] (auto& obj) { EXPECT_ANY_THROW(std::move(obj).left()); }, [&] (auto& obj) { - EXPECT_EQ(expected, obj.right_opt().value()); + auto a = obj.right_opt(); + EXPECT_EQ(expected, a.value()); }, [&] (auto& obj) { - EXPECT_EQ(expected, std::move(obj).right_opt().value()); + auto a = std::move(obj).right_opt(); + EXPECT_EQ(expected, a.value()); }, [&] (auto& obj) { EXPECT_EQ(boost::none, obj.left_opt()); }, [&] (auto& obj) {