Skip to content

Commit

Permalink
revert non_owning_storage user-defined move semantic, use default mov…
Browse files Browse the repository at this point in the history
…e semantic
  • Loading branch information
AlePalu committed Mar 8, 2024
1 parent 4552388 commit 18c8d1e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions fdaPDE/utils/type_erasure.h
Original file line number Diff line number Diff line change
@@ -116,11 +116,9 @@ struct non_owning_storage {
ptr_ = other.ptr_;
return *this;
}
non_owning_storage(non_owning_storage&& other) : ptr_(std::exchange(other.ptr_, nullptr)) { }
non_owning_storage& operator=(non_owning_storage&& other) {
ptr_ = std::exchange(other.ptr_, nullptr);
return *this;
}
// avoid move semantic
non_owning_storage(non_owning_storage&& other) = delete;
non_owning_storage& operator=(non_owning_storage&& other) = delete;
};

struct heap_storage {

0 comments on commit 18c8d1e

Please sign in to comment.