Skip to content

Commit

Permalink
fix clang deprecated-copy-with-user-provided-dtor
Browse files Browse the repository at this point in the history
  • Loading branch information
FredBill1 committed Feb 15, 2024
1 parent d37de31 commit 1924bc6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_smart_ptr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,9 @@ struct SharedFromThisVirt : virtual SharedFromThisVBase {};
struct SharedFromThisForCustomHolder
: std::enable_shared_from_this<SharedFromThisForCustomHolder> {
int value;
SharedFromThisForCustomHolder(const SharedFromThisForCustomHolder &) = default;
explicit SharedFromThisForCustomHolder(int v) : value(v) { print_created(this, toString()); }
~SharedFromThisForCustomHolder() { print_destroyed(this, toString()); }
virtual ~SharedFromThisForCustomHolder() { print_destroyed(this, toString()); }
std::string toString() const {
return "SharedFromThisForCustomHolder[" + std::to_string(value) + "]";
}
Expand Down

0 comments on commit 1924bc6

Please sign in to comment.