EASTL icon indicating copy to clipboard operation
EASTL copied to clipboard

fix swap of eastl::list<unique_ptr[]>

Open virt00l opened this issue 11 months ago • 2 comments

...or any other type that has deleted dtor.

const this_type temp(*this); // << This would attept to call copy ctor of unique_ptr<> which is explicitly deleted
*this = x;
x     = temp;

virt00l avatar Feb 04 '25 13:02 virt00l

Nvm, this did not fix it. WIP, please don't merge (yet)

virt00l avatar Feb 05 '25 20:02 virt00l

Okay. Now fixed. Code like

eastl::list<eastl::unique_ptr<T>> foo, bar;
foo.swap(bar)

now compiles (but require EASTL_NAME_ENABLED being off)

virt00l avatar Feb 07 '25 21:02 virt00l