Static variable and type: could there be another simpler way to implement a function that returns the same ID for each user-defined type?
I was working on creating an entity-component system on my own, and in doing this I have gotten help from a lot of YouTube videos, C++ references, recommended books, etc. While I was implementing a functionality that returns IDs for specific components(which are implements as structs), I started wondering: