You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.