On 2/23/15 3:16 PM, "Nordlöw" wrote:
On Monday, 23 February 2015 at 19:24:32 UTC, Steven Schveighoffer wrote:
In answer to your question, RBNode should not be accessible direction
outside of RedBlackTree. But we don't have allocators inside of
Phobos, so I used the easiest thing I could for portability.
Does this mean that in the long run RBTree should allocate its RBNodes
using a non-GC allocator (such as std.allocator) instead?
It means that it can do that, and does do that in dcollections.
std.container does not have all the code to do it, dcollections.RBTree
has some extra calls that would probably help. However, the allocation
is done in one spot so the code can easily use an allocator.
-Steve