BaseLeaf and BaseNode are used for the type erasure part of the
implementation. Only Leaf and Node structures are allocated.
The question is how to ensure a data structure that allows all slices to coexist, especially BaseNode and Leaf?
The template part T has dynamic size and alignment. AFAIK the alignment requirement automatically applies to all structures containing T, i.e.
Node and Leaf. Of course padding might be required between header and
content. But how to ensure that the Padding remains the same when Node
is allocated instead of Leaf?
The goal is to get a minimum memory overhead of only a few bits per
entry for large number of entries. So no virtual functions nor virtual
base classes at node level.