We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7f82e3 commit 86d6b9aCopy full SHA for 86d6b9a
tests/issues.cpp
@@ -201,4 +201,23 @@ TEST_CASE("PR 156", "[pr.156]") {
201
REQUIRE(!(a != b));
202
REQUIRE(a != c);
203
REQUIRE(b != c);
204
+}
205
+
206
+class MoveOnly {
207
+public:
208
+ MoveOnly() = default;
209
210
+ // Non-copyable
211
+ MoveOnly(const MoveOnly &) = delete;
212
+ MoveOnly &operator=(const MoveOnly &) = delete;
213
214
+ // Movable trivially
215
+ MoveOnly(MoveOnly &&) = default;
216
+ MoveOnly &operator=(MoveOnly &&) = default;
217
+};
218
219
+TEST_CASE("Issue 145", "[issues.145]") {
220
+ tl::expected<MoveOnly, std::error_code> a{};
221
+ tl::expected<MoveOnly, std::error_code> b = std::move(a);
222
+ a = std::move(b);
223
}
0 commit comments