Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2004-01-07 03:08:53


"Jan Langer" <jan_at_[hidden]> wrote

> > Yep ... Dont have a clue what this SIUnits syntax is about:
> > Length L = 5 * meters ;
> > I tend to assume that operator * means multiply... Nope apparently not
> > in SIUnits.
>
> i do not really know what you mean, but 5 * meter(s) looks very natural
> to me. a scalar factor 5 is multiplied to a length of a meter, which
> results in a length of 5 meters. if you have an implicit value_type and
> if you assume to be solely in a specific units system, the syntax
> length l = 5*meters;
> expresses all facts.

So does:

q_length::m l(5);

I would initialise a vector of volumes in cubic-kilometres like this:

std::vector<q_volume::km3> vect(1000);

What is the equivalent of this declaration in SIunits syntax?

regards
Andy Little


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