Skip to content

Commit bb65790

Browse files
committed
Delete copy/move constructor/assignment operator for file_t
They would break the cleanup function of the class destructor.
1 parent 76d34ae commit bb65790

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/common-cleanup.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ class file_t
3434
}
3535
}
3636

37+
file_t(file_t const &) = delete;
38+
file_t &operator=(file_t const &) = delete;
39+
40+
file_t(file_t &&) = delete;
41+
file_t &operator=(file_t const &&) = delete;
42+
3743
~file_t() noexcept { delete_file(true); }
3844

3945
private:

0 commit comments

Comments
 (0)