Skip to content

Allow rvalue_refs to be used with push and update methods (update, increase, and decrease) #52

@rcollyer

Description

@rcollyer

Currently, only emplace has move semantics with regards to adding or updating the values in any of the heaps. This is limiting when the value_type is move only, especially as there is no workaround for the update methods. (emplace will invoke the move constructor, so it can be used as work around for push.) I propose adding overloads for the adding or updating methods to allow for values with move semantics to be used, e.g.

handle_type push(value_type&&);
void update(handle_type, value_type&&);
void increase(handle_type, value_type&&);
void decrease(handle_type, value_type&&);
void update_lazy(handle_type, value_type&&); // fibonacci_heap only

A similar issue exists in #23 for dealing with the comparison function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions