Hi, i have been trying to implement RTTI for a while but haven't found a good solution. Ideally the interface should revolve to asking via a static call:
T::GetTypeID();
I have tried using CRTP but as you know this doesn't give the Base class access too the TypeID so you cant do:
T::GetTypeID() == BaseClass::GetTypeID();
I also tried the macro approach where you pass a class name in and generate some functions for it, at runtime i compute the hash when the TypeID is requested and store it, yeah it costs an extra 4 Bytes per …