@@ -16,10 +16,14 @@ private import stdx.allocator.mallocator : Mallocator;
1616 *
1717 * T-tree Nodes are (by default) sized to fit within a 64-byte
1818 * cache line. The number of items stored per node can be read from the
19- * `nodeCapacity` field . Each node has 0, 1, or 2 children. Each node has between
19+ * `nodeCapacity` enum . Each node has 0, 1, or 2 children. Each node has between
2020 * 1 and `nodeCapacity` items, or it has `nodeCapacity` items and 0 or
2121 * more children.
2222 *
23+ * Inserting or removing items while iterating a range returned from `opSlice`,
24+ * `upperBound`, `equalRange`, or other similar functions will result in
25+ * unpredicable and likely invalid iteration orders.
26+ *
2327 * Params:
2428 * T = the element type
2529 * Allocator = the allocator to use. Defaults to `Mallocator`.
@@ -254,7 +258,7 @@ struct TTree(T, Allocator = Mallocator, bool allowDuplicates = false,
254258 /**
255259 * Returns: the first element in the tree.
256260 */
257- inout (T) front (this This)() inout pure @trusted @property
261+ auto front (this This)() inout pure @trusted @property
258262 {
259263 import std.exception : enforce;
260264
@@ -269,7 +273,7 @@ struct TTree(T, Allocator = Mallocator, bool allowDuplicates = false,
269273 /**
270274 * Returns: the last element in the tree.
271275 */
272- inout (T) back (this This)() inout pure @trusted @property
276+ auto back (this This)() inout pure @trusted @property
273277 {
274278 import std.exception : enforce;
275279
@@ -465,6 +469,9 @@ struct TTree(T, Allocator = Mallocator, bool allowDuplicates = false,
465469
466470 mixin AllocatorState! Allocator;
467471
472+ // / The number of values that can be stored in a single T-Tree node.
473+ enum size_t nodeCapacity = N[0 ];
474+
468475private :
469476
470477 import containers.internal.element_type : ContainerElementType;
@@ -478,7 +485,6 @@ private:
478485
479486 alias N = FatNodeInfo! (T.sizeof, 3 , cacheLineSize, ulong .sizeof);
480487 alias Value = ContainerStorageType! T;
481- enum size_t nodeCapacity = N[0 ];
482488 alias BookkeepingType = N[1 ];
483489 enum HEIGHT_BIT_OFFSET = 48UL ;
484490 enum fullBitPattern = fullBits! (ulong , nodeCapacity);
0 commit comments