It seems to works (but i use Unqual!T directly) Thank you :)
Il giorno mer, 18/07/2012 alle 11.13 +0200, bearophile ha scritto: > Andrea Fontana: > > > const(int) : int <-- true > > const(PP) : PP <-- false > > > > Is this behaviour correct? > > I think it's correct, and it's caused by the difference between > value types and reference types. > > > > And how can I check if T is of a certain class ignoring consts > > (and avoiding double checks)? > > There are some different ways to do it, one of them is to use > something like (untested): > > is(Unqual!typeof(x) == PP) > > Where Unqual is in Phobos, std.traits.Unqual. > > Bye, > bearophile