From 37e2660c7fb498d7ab6187befbe005cd5c8ca23a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven=20Dee=20=28J=C5=8Dshin=29?= Date: Sun, 15 Sep 2024 04:18:19 -0400 Subject: [PATCH] make_shared should work with nontrivial objects (#1293) --- ctl/shared_ptr.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ctl/shared_ptr.h b/ctl/shared_ptr.h index ae3316831..317374bfd 100644 --- a/ctl/shared_ptr.h +++ b/ctl/shared_ptr.h @@ -147,6 +147,10 @@ class shared_emplace : public shared_ref T t; }; + ~shared_emplace() override + { + } + template void construct(Args&&... args) { @@ -159,7 +163,9 @@ class shared_emplace : public shared_ref } private: - explicit constexpr shared_emplace() noexcept = default; + explicit constexpr shared_emplace() noexcept + { + } void dispose() noexcept override {