A coworker recently showed me some code that he found online. It appears to allow compile time determination of whether a type has an \"is a\" relationship with another type. I
I'm no C++ expert, but it looks to me like the point is to get the compiler to decide between the two overloads of test(). If Derived is derived from Base then the first one will be used, which returns char, otherwise the second one will be used - which returns char[2]. The sizeof() operator then determines which of these happened and sets the value of conversion::exists accordingly.