Skip to content

Commit 37e2660

Browse files
authored
make_shared should work with nontrivial objects (#1293)
1 parent 675abfa commit 37e2660

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ctl/shared_ptr.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ class shared_emplace : public shared_ref
147147
T t;
148148
};
149149

150+
~shared_emplace() override
151+
{
152+
}
153+
150154
template<typename... Args>
151155
void construct(Args&&... args)
152156
{
@@ -159,7 +163,9 @@ class shared_emplace : public shared_ref
159163
}
160164

161165
private:
162-
explicit constexpr shared_emplace() noexcept = default;
166+
explicit constexpr shared_emplace() noexcept
167+
{
168+
}
163169

164170
void dispose() noexcept override
165171
{

0 commit comments

Comments
 (0)