make_shared should work with nontrivial objects (#1293)

This commit is contained in:
Steven Dee (Jōshin) 2024-09-15 04:18:19 -04:00 committed by GitHub
parent 675abfa029
commit 37e2660c7f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -147,6 +147,10 @@ class shared_emplace : public shared_ref
T t; T t;
}; };
~shared_emplace() override
{
}
template<typename... Args> template<typename... Args>
void construct(Args&&... args) void construct(Args&&... args)
{ {
@ -159,7 +163,9 @@ class shared_emplace : public shared_ref
} }
private: private:
explicit constexpr shared_emplace() noexcept = default; explicit constexpr shared_emplace() noexcept
{
}
void dispose() noexcept override void dispose() noexcept override
{ {