Boost logo

Boost :

From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-05-14 11:37:04


AMDG

Zach Laine wrote:
> I realize that the Units libary is still a work-in-progress, but I
> thought you might like to know about these failures. Using 1.35.0
> with the latest Units code (SVN rev. 45355) and using GCC 4.1.2, I get
> these failures in test/:
>
> test_limits,
> test_cmath
>

Whoops, I'm testing against the trunk...

> The exact compilation errors are in the file attached.
>
> Also, I cannot compile this simple test code. I may very well be
> doing something wrong:
>
> #include <boost/units/systems/si.hpp>
> #include <boost/units/systems/other/foot.hpp>
> #include <boost/units/systems/detail/non_si_unit.hpp>
>
>
> BOOST_UNITS_NON_SI_UNIT(survey, yard_per_sec, yard_per_sec, 0.3048006
> * 3.0, boost::units::SI::velocity, 53);
>
> typedef boost::units::quantity<boost::units::survey::yard_per_sec_base_unit,
> double> YardsPerSec;
>

Grrr. A base unit is not the same as a unit. try
boost::units::survey::yard_per_sec_base_unit::unit_type.

In Christ,
Steven Watanabe


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk