From 841664fcf47e82266e511d9f8d3d895f760df78e Mon Sep 17 00:00:00 2001 From: Vladimir 'virtul' Ivannikov Date: Tue, 4 Feb 2025 16:20:31 +0300 Subject: [PATCH] fix swap of eastl::list ...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; ``` --- include/EASTL/list.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/EASTL/list.h b/include/EASTL/list.h index 8060caa2..99998ea2 100644 --- a/include/EASTL/list.h +++ b/include/EASTL/list.h @@ -1575,8 +1575,8 @@ namespace eastl DoSwap(x); else // else swap the contents. { - const this_type temp(*this); // Can't call eastl::swap because that would - *this = x; // itself call this member swap function. + this_type temp(*this); // Can't call eastl::swap because that would + *this = x; // itself call this member swap function. x = temp; } }