I formed a good interview question by accident. :)
template<typename T> bool foo (T obj) { if(typeid(T) == typeid(obj)) return false; return true;
You should call (only above) foo() so that it returns true . Conditions:
- Cannot edit or reload
foo() or typeid - Allowed to use specific platform hackers
- No
#define allowed
source share