

C++: Checking units at compile time (2003) - wfunction
http://everything2.com/index.pl?node_id=1429028

======
BenFrantzDale
Also:
[http://www.boost.org/doc/libs/1_56_0/doc/html/boost_units.ht...](http://www.boost.org/doc/libs/1_56_0/doc/html/boost_units.html)

------
rsorrel
Stroustrup discusses compile time units (starting at slide 19) in the
following presentation:

[http://ecn.channel9.msdn.com/events/GoingNative12/GN12Cpp11S...](http://ecn.channel9.msdn.com/events/GoingNative12/GN12Cpp11Style.pdf)

------
im3w1l
Nice trick. One thing bothers me, couldn't the compiler use operator float and
the construct from float for non-matching units?

~~~
coyotebush
I believe using those together counts as two user-defined conversions and is
rejected. But one or both of those might as well be declared explicit.

------
marvy
here is something harder: [http://yosefk.com/blog/can-your-static-type-system-
handle-li...](http://yosefk.com/blog/can-your-static-type-system-handle-
linear-algebra.html)

