Units of measure are, of course, the aboriginal type system for pre-software hand calculation.. carrying units along to make sure you do not add apples to oranges { unless you know how to convert "apples" to "oranges" for some adapted metaphorical fruits.. e.g. orange section/segment/slices :-) }.
Just for curiosity, what Nim does that other languages with operator overloading wouldn't do? Aside from the "number.unit" syntax, you could do some trickery to get units comparison and conversions even on C++
Anything with a finite (200 is small even) number of units misses the algebraic structure of the problem mentioned in https://news.ycombinator.com/item?id=36988497 wherein multiplying|dividing two things gives you a (potentially) new unit which implies an open ended "space" of units.
To be concrete (hah!), in C++ a template meta-type with 12 signed integer parameters (6 numerators & 6 denominators for rational exponents of SI base units) might be one way to model it.
Unlike C++ template stuff, Nim macros (like Lisp macros) makes metaprogramming more like procedural programming - just against abstract syntax trees. I think that helps to shield some of this type complexity from users, but the documentation README https://github.com/SciNim/Unchained does better job than I can in an HN comment.
Of course, for unit system conversion, the number of dimensions (6 in SI, 3 in CGS/Gaussian) changes. So, for full generality you need compile-time (if you want static type integration/CT errors) linear algebra over a rational field (at least & conventionally) to project|inverse project. That might be theoretically possible in C++. I would think it very un-fun and unlikely to ever have been done. There's probably a Mathematica package, though.
EDIT: It seems that mp-units mentioned in a sibling comment has some rare support for varying unit systems (no GR or Planck ones, but at least "natural" & "hep" & not sure about system-conversion or just system-use). That lib also leans very heavily on many very modern C++ (C++20 & beyond) features, has constexpr everywhere in use cases. I am not sure I would say it shields users wonderfully or makes it seem like units are very ordinary types. Just looking at mp-units/example/VARIOUS.cpp makes it look syntactically very noisy, verbose, and a lot to learn.
Nim [1] has sufficient compile-time strength that units can be integrated with the static type system: https://github.com/SciNim/Unchained
[1] https://nim-lang.org/