intrusive
intrusive copied to clipboard
splice() should take template instead of slist&
I have something like follows:
class Parent : public slist_base_hook<>
{
// virtual destructor, etc
};
class Child : public Parent
{};
slist<Parent> storage;
slist<Child> temporaries;
I need to move all elements from temporaries to storage at the end of a function. I've tried to use splice(), but it doesn't work because it expects a slist of the same type as *this.