test if object is instance of class at compile time

Elvis Maehren maehlvis at googlemail.com
Thu Dec 22 02:03:56 PST 2011


Vladimir Panteleev wrote:
> I believe that's what __traits(compiles, ...) is for:

__traits(compiles, cast(T) o) is true even if the cast blows up in CTFE, so 
that doesn't work.


More information about the Digitalmars-d-learn mailing list