diff --git a/orc-rt/include/orc-rt/RTTI.h b/orc-rt/include/orc-rt/RTTI.h index 734205200cc6..8ac96d1aaf4d 100644 --- a/orc-rt/include/orc-rt/RTTI.h +++ b/orc-rt/include/orc-rt/RTTI.h @@ -52,8 +52,12 @@ #ifndef ORC_RT_RTTI_H #define ORC_RT_RTTI_H +#include + namespace orc_rt { +class ErrorInfoBase; + template class RTTIExtends; /// Base class for the extensible RTTI hierarchy. @@ -107,6 +111,10 @@ private: /// template class RTTIExtends : public ParentT { public: + static_assert(!std::is_base_of_v, + "RTTIExtends should not be used to define orc_rt custom error " + "types, use ErrorExtends instead"); + // Inherit constructors and isA methods from ParentT. using ParentT::isA; using ParentT::ParentT;