> assert(typeid(*this) == typeid(Whatever));

That would only work if we had rtti available.