These are called "strong/opaque typedefs". There have been multiple proposals in the past to add them to C++ over the years (N1706, N1891, N3515, N3741, P0109); the main roadblock is that most people would like to allow to edit a type's interface after creating the new type (for example, by preventing the sum of two int-like ProgramVersions), which is for example non-trivial for primitive types. It should also of course work for non-primitive types, which introduces lots of interactions with inheritance, templates, and so on.
As another possible way to achieve this, here's the huge proposal to add C++ metaclasses, which I'm personally not really a fan of, since it looks like it would add an additional third language on top of C++.
Thus, the general opinion is that everybody would like that feature in one form or another, but it's quite impossible to find a consensus on what the feature would look like.
As another possible way to achieve this, here's the huge proposal to add C++ metaclasses, which I'm personally not really a fan of, since it looks like it would add an additional third language on top of C++.
Thus, the general opinion is that everybody would like that feature in one form or another, but it's quite impossible to find a consensus on what the feature would look like.