
1 Aug
2011
1 Aug
'11
9:58 a.m.
Hi Marcel, On Mon, Aug 1, 2011 at 7:39 AM, Marcel <minusdreidb+boost@gmail.com> wrote:
thanks for your reply. The example compiles here too in fact, which made me check my actual code more thoroughly: I had used "2" for the factor in my actual code instead of "2.0" as stated in my example. The differing value types seemed to cause the problem.
Ah, yes. The scalar multiplication is defined for the underlying type of the quantity -- had you written quantity<si::length, float> (rather than use the implicit double) you would have had to use 2.f * a; i.e. implicit conversions of scalar types aren't supported. That's bitten me a few times. Glad it's working. Nate