You can do this – as in, it compiles and will work.
But why do you want to do this? It seems to have no purpose in this general form. Are you maybe trying to use a class as a namespace?
In general, this screams of lack of thought about the class design. You seem to have only few types without clearly designated purpose, and you’re apparently using (shared) pointers in a completely inappropriate manner.