diff --git a/source/stdcpp/list.d b/source/stdcpp/list.d index b03d0da..c307716 100644 --- a/source/stdcpp/list.d +++ b/source/stdcpp/list.d @@ -333,10 +333,8 @@ extern(C++, class) struct list(Type, Allocator) /// ref list opAssign(ref const list other) { - import core.lifetime : emplace; - - this = *(emplace(&this, other)); - return this; + auto object = list!(Type)(other); + return object; } /// void assign(size_type count, ref const value_type value);