// .h
class I_Base
{
RTTR_ENABLE()
};
template<class TMyType>
class I_CrtpBase : public I_Base
{
RTTR_ENABLE(I_Base)
};
class MyClass : public I_CrtpBase<MyClass>
{
RTTR_ENABLE(I_CrtpBase<MyClass>)
}
At runtime the code gets stuck during registration, since it tries to create the type for MyClass, then notices it has to create the type for I_CrtpBase<MyClass>, notices the template parameter MyClass and tries to create the type for that again.
registering I_CrtpBase<MyClass> first has the same result just the other way around.
so considering tihs use case:
At runtime the code gets stuck during registration, since it tries to create the type for
MyClass
, then notices it has to create the type forI_CrtpBase<MyClass>
, notices the template parameterMyClass
and tries to create the type for that again. registeringI_CrtpBase<MyClass>
first has the same result just the other way around.