Removed instanceOf.
I think it's time to remove MOST of the poor man's RTTI now.
This commit is contained in:
@ -136,20 +136,6 @@ public:
|
||||
* registered.
|
||||
*/
|
||||
const char *getClassName() { return classesById.at( classId )->className; }
|
||||
|
||||
template< typename T >
|
||||
[[deprecated]]
|
||||
inline bool
|
||||
instanceOf()
|
||||
{
|
||||
const bool expected= dynamic_cast< T * >( this );
|
||||
const bool witness= instanceOf_impl( T::CLASS_ID );
|
||||
if( witness != expected ) throw std::logic_error{ "RTTI based `instanceOf` disagrees with Dillo's lout:: impl." };
|
||||
return expected;
|
||||
}
|
||||
|
||||
private:
|
||||
bool instanceOf_impl (std::intptr_t otherClassId);
|
||||
};
|
||||
|
||||
} // namespace identity
|
||||
|
||||
Reference in New Issue
Block a user