
29 Mar
2007
29 Mar
'07
7:24 p.m.
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. -Lewis