Skip to content

Commit

Permalink
Add move constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
romainthomas committed Aug 31, 2024
1 parent 0e04b4a commit 9b2bd35
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/rust/include/LIEF/rust/Mirror.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ class Mirror {
public:
Mirror(T& impl) : impl_(impl) {}
Mirror(const T& impl) : impl_(impl) {}
Mirror(T&& impl) :
Mirror(std::make_unique<T>(std::move(impl)))
{}
Mirror(std::unique_ptr<T> impl) : impl_(std::move(impl)) {}

T& get() { return *impl_; }
Expand Down

0 comments on commit 9b2bd35

Please sign in to comment.