Skip to content

Commit

Permalink
refactor(paranted_ptr): explicitly delete move operations
Browse files Browse the repository at this point in the history
  • Loading branch information
Swiftb0y committed Sep 15, 2023
1 parent 52f1803 commit 6801d6b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/util/parented_ptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ class parented_ptr final {
// explicitly generate trivial destructor (since decltype(m_ptr) is not a class type)
~parented_ptr() noexcept = default;
#endif
// Rule of 5
parented_ptr(const parented_ptr<T>&) = delete;
parented_ptr& operator=(const parented_ptr<T>&) = delete;
parented_ptr(const parented_ptr<T>&& other) = delete;
parented_ptr& operator=(const parented_ptr<T>&& other) = delete;

// If U* is convertible to T* then parented_ptr<U> is convertible to parented_ptr<T>
template<
Expand Down

0 comments on commit 6801d6b

Please sign in to comment.