Boost logo

Boost :

From: Hickerson, David A (david.a.hickerson_at_[hidden])
Date: 2007-03-29 18:31:07


The former is the way MathCAD does it, and appears more engineeringly
correct, imho. Any reason not to support both?

Dave

-----Original Message-----
From: Eric Lemings [mailto:lemings_at_[hidden]]
Sent: Thursday, March 29, 2007 4:13 PM
To: boost_at_[hidden]
Subject: Re: [boost] units: review

 

> -----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.

Eric.
_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost


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