i think you could actually do that in C++ as a library with a bit of metaprogramming. the arithmetic operations will get weird though unless everything is the same type, for example what is the result type of int<-10, 10>+int<0, 20>? (the "right" answer is probably a megabyte of compiler errors)
evouga|3 years ago