Boost logo

Boost :

From: Eric Lemings (lemings_at_[hidden])
Date: 2007-03-29 18:12:32


> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of Lewis Hyatt
> Sent: Thursday, March 29, 2007 3:59 PM
> To: boost_at_[hidden]
> Subject: Re: [boost] units: review
> Eric Lemings wrote:
> > It's not a faux operation: the unit is already plainly
> specified as part
> > of the type and the value of the quantity is plainly
> specified as the
> > constructor argument. Pretty straight forward if you ask me.
> consider this usage:
> quantity<SI::length> l1(2.0 * SI::meters);
> quantity<SI::length> l2(2.0 * Astro::parsecs); //for illustration only

I would express that differently:

quantity<SI::length> l1 (quantity<SI::meter>(2.0));
quantity<SI::length> l2 (quantity<Astro::parsecs>(2.0)); //for
illustration only

And I could be way off base here but the latter form would appear more
familiar/acceptable to most C++ programmers.


Boost list run by bdawes at, gregod at, cpdaniel at, john at