Right after allocators: containers or database connectivity?

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 11 05:47:48 PDT 2015


On 6/9/15 6:05 PM, Jonathan M Davis wrote:
> On Tuesday, 9 June 2015 at 18:49:04 UTC, Brad Anderson wrote:
>>  We also have map in the form of RedBlackTree. I think you might be
>> able to use RedBlackTree for a set too but I haven't tried it.
>
> You can, but it's a bit of a pain, because you have to keep passing it a
> tuple where the value gets ignored. We really need a wrapper around it
> to make it cleaner.

Map is a pain. Set is not. The apparatus around RedBlackTree in 
dcollections to turn it into a map is non-trivial, and is worthy of 
having in std.container. TreeSet, however, was pretty much straight 
mapping to implementation calls.

-Steve


More information about the Digitalmars-d mailing list