
"Paul Mensonides" wrote
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Andy Little
pqs Version 3.0.6 is in the Boost vault Now: http://tinyurl.com/7m5l8
This (my small sample code) is in no way supposed to be a full-blown library, BTW. It is just for amusement.
How about rational dimension elements rather than integers. Would that be possible using the preprocessor? This occurs rarely but needs to be possible. One example is in measuring electrical noise where units for noise-voltage density are Volts * (Hertz to_power -1/2). The time element of the dimension works out as being to power -(2 1/2) FWIW!
The things that I find amusing in it are that dimensions are specified using variables, not types (somewhat unusual), and the way that the reconstruction of type from variables occurs.
Is that the same as how Boost.typeof works ...? acceleration a; mass m; BOOST_TYPEOF( m * a) f; //or BOOST_AUTO(f, m * a); regards Andy little