I was going through some code and I found something like this:
class GarbageCollectorProcess : public process::Process<GarbageCollectorProcess>
I was wondering if this was a valid thing to do. If yes, shouldn't this lead to some kind of a self definition loop because we are defining a GarbageCollectorProcess using another class that depends on the definition of GarbageCollectorProcess?
It's valid thing to do. This is how CRTP working.