Is it possible to just check for RTTI without having the overhead of catching an exception? dynamic_cast just throws an exception and I just need to see if something has RTTI or not in a highly used section of code where an exception would be a huge problem…
Share
You need to check the pointer you create with dynamic_cast against NULL. If it equals NULL, the cast did not work. If it doesn’t, the cast worked, and there will be no exceptions thrown.