diff --git a/test/cpp-utils/either_test.cpp b/test/cpp-utils/either_test.cpp index b5c0a8ce..2bd65af1 100644 --- a/test/cpp-utils/either_test.cpp +++ b/test/cpp-utils/either_test.cpp @@ -71,7 +71,8 @@ std::vector&)>> EXPECT_IS_LEFT(const Left }, [&] (auto& obj) { EXPECT_EQ(expected, obj.left_opt().value()); }, [&] (auto& obj) { - EXPECT_EQ(expected, std::move(obj).left_opt().value()); + auto a = std::move(obj).left_opt(); + EXPECT_EQ(expected, a.value()); }, [&] (auto& obj) { EXPECT_EQ(boost::none, obj.right_opt()); }, [&] (auto& obj) {