isAllocator

BBaz via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Dec 1 05:01:49 PST 2015


On Tuesday, 1 December 2015 at 12:37:12 UTC, Tofu Ninja wrote:
> On Tuesday, 1 December 2015 at 08:58:56 UTC, BBaz wrote:
>> I think that `is(CAllocatorImpl!Alloc)` should work too then.
>
> According to the 'is' version, int is an allocator. No idea why 
> it thinks this works...

Me neither, actually, and to be honnest, I didn't test, but from 
the version that uses the "compiles" traits, I thought that 
testing if the type generated from a template instantiation is 
valid then it would be equivalent...Apologies, I didn't meant to 
lead anybody in the wrong direction.




More information about the Digitalmars-d-learn mailing list