From: Ben Strasser (strasser.ben_at_[hidden])
Date: 2006-08-28 18:16:09
Deane Yang <deane_yang <at> yahoo.com> writes:
> I've taken a quick look at the documentation of Ben's units library and
> tried to compile it using VC++ 8.0.
> Andy Little wrote:
> > I liked the example in basic.cpp. It compiled and ran OK in gcc4.0 but
> > unfortunately not in VC7.1.
> I was unable to get it to compile in VC8.0. It gives errors in the
> compile-time rational number code (in compile_time_number.hpp).
Could you please post the error message? I only tested it on the lastest mingw.
> It looks very close to what I want. The only thing I would
> like to see is a preferred implementation for explicit conversion
> between different units of the same dimension. I could probably add this
> layer to the library myself but was wondering if you've done this already.
You mean disallowing implicit conversion? Look at the currency.cpp example. It's
a mixure of implicit static conversions (cent <-> euro) and of explicit dynamic
conversions (euro <-> dollar <-> yen). An implicit conversion between euro and
dollar is not possible.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk