2 ms·
In C++, you can do this with custom literals, not meta programming: https://en.cppreference.com/w/cpp/language/user_literal https://en.cppreference.com/w/cpp/la
by ant6n 4y ago
In C++, you can do this with custom literals, not meta programming: https://en.cppreference.com/w/cpp/language/user_literal https://en.cppreference.com/w/cpp/language/user_literal
One would have to make a library with various classes representing various units, plus the (implicit) conversion between them. It´s probably something that exists somewhere.