Hey

I am currently working on a game and ran into a very usual problem in game development.
What I am trying to do, is providing global and scoped access to Services/Subsystems (e.g. Graphics renderer) that are not static.

Basicly 'Provider' is a template for actual providers (e.g. GraphicsProvider), whose hold pointers to services, that then can be accesst through 'Get<T>()' from all over the code.
Get will return nullptr if there is no provider holding the service, or if there is no service registered to the provider.
Please have a look into main.cpp to get an idea of how it is used.

full code:
main.cpp
provider.h
traits.h

Do you have advide or a better solution?
What do you think about this approach?

Thanks lots