std.container: fork in the road

Adam D. Ruppe via Digitalmars-d digitalmars-d at puremagic.com
Wed Jun 17 11:03:45 PDT 2015


On Wednesday, 17 June 2015 at 16:00:30 UTC, Wyatt wrote:
> I guess I'll have to wait for Adam's write-up, then.

I'm probably going to write that one tomorrow, but won't post it 
until Sunday night/Monday morning.

The short of it is to check for what methods are available 
instead of trying to name each possible combination. So instead 
of like checking if(is(A == DealloctableAllocator)), check 
if(hasMember!(A, "deallocate"))


The combination of potential methods makes it easier to look at 
one bit at a time instead of trying to abstract them all into 
concepts.



More information about the Digitalmars-d mailing list