boostorg / boostorg/heap

Allow passing `value_compare` by rvalue_ref.

Open
#23 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
20
Forks
44
PR merge metrics
No merged PRs in 30d

Description

Currently the code only supports [making a copy](https://github.com/boostorg/heap/blob/19fda03545e1b85b3a2d3a94b9a3930ec64335d4/include/boost/heap/detail/stable_heap.hpp#L164-L168) of the comparison object. It would be great to support moving comparison objects into place to permit move-only comparison objects and better efficiency of heavy weight comparison objects.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in include/boost/heap/detail/stable_heap.hpp at the comparison-object construction around lines 164-168, then inspect related heap tests and constructor paths. Confirm how comparison objects are currently copied, and consider the issue complete when rvalue and move-only comparison objects are accepted without copying and the relevant tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.