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.
I have something like follows:
I need to move all elements from
temporariestostorageat the end of a function. I've tried to usesplice(), but it doesn't work because it expects aslistof the same type as*this.