1

Is it possible to detect that a CRTP base class is templated with the exact same class deriving from base?

I've something like

class GeneratedA : public RegisteredEvent<GeneratedA>;
class GeneratedB : public RegisteredEvent<GeneratedB>;

which works but is it possible to trigger a compile error if the interface is used like this:

class GeneratedB : public RegisteredEvent<GeneratedA>;

Thank you

Hhut
  • 1,128
  • 1
  • 12
  • 24

0 Answers0