Boost logo

Boost :

From: Lewis Hyatt (lhyatt_at_[hidden])
Date: 2007-03-29 15:24:28

>> what about a syntax like
>> q.convert_from(r)
>> to emphasize that this is performing a safe unit conversion, and to
>> avoid having to repeat the type name?
> We currently have a static member function that works like that :
> q = quantity<SI::length,double>::from_value(r);
> Maybe that's enough...

It certainly gets the job done, I personally would prefer the other way
because q already has a known assigned type, and it is somewhat annoying
to have to write it out again just to assign a new value, but it's not
such an important point.


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