
I would not want to write any software that internally calculates with non-metric units. -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Mark Volkmann Sent: Friday, January 09, 2009 14:24 To: Boost-users@lists.boost.org Subject: [Boost-users] Units: adding quantities I have a method that takes a parameter of type quantity<feet> where feet is defined by the following typedef: typedef boost::units::us::foot_base_unit::unit_type feet; I also have this typedef: typedef bu::us::inch_base_unit::unit_type inches; Do I really need to define a typedef like this for every measurement type I want to use? I certainly don't want to specify all those namespaces every time I use one of the measurement types, but this approach seems a bit tedious. I'd like to do something like this: a.setWingspan(195*feet() + 8*inches()); but that doesn't work because there is no match for operator+. What's a good way to add inches to a feet quantity? --- Mark Volkmann _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users