Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

BTreeG: consider using a generic type for the key #62

Open
@RaduBerinde

Description

In many cases the T type used with BTreeG contains the key and other fields (in some cases, many other fields). It is awkward to create a "full" T object with only the key initialized just to pass to Get() or Delete() or AscendRange().

My proposal is to define K as the key type and create the btree using a LessFunc<K> as well as a func (t T) K which returns the key from a T object. Methods like Get(), Delete(), or AscendRange() would only take a K. The current BTreeG can be reimplemented in terms of this tree, with K = T.

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

        AltStyle によって変換されたページ (->オリジナル) /