Skip to content

splice() should take template instead of slist& #101

@vinipsmaker

Description

@vinipsmaker

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions