dummy question : runtime type testing...

Lloyd Dupont ld-REMOVE at galador.net
Sat Jun 18 03:51:28 PDT 2011


That simple hey?!?
Awesome!
You are a week-end saver! :)

"Mike Wey"  wrote in message news:ithv61$2j5t$1 at digitalmars.com... 

bool isTypeOf(T)(TypeInfo ti)
{
     return ( typeid(T) is ti );
}

bool isTypeOf(TypeInfo ti1, TypeInfo ti2)
{
     return ( ti1 is ti2 );
}

-- 
Mike Wey


More information about the Digitalmars-d-learn mailing list