Boost logo

Boost :

From: Matthias Schabel (boost_at_[hidden])
Date: 2007-03-29 10:49:56


>> Also, quantity<> should pass through operator++ and
>> operator-- in
>> addition to the other arithmetic operators.
>>
>
> I strongly disagree. Those operators make no sense for dimensioned
> quantities; it would be like allowing "12.34 meters + 1".

This raises an interesting question; in this case

double v(1.0);

++v;

does the ++v mean

v = v + 1;

or

v = v + double(1);

? In either case, this would be illegal with our current quantity
syntax, so perhaps it should not be supported, at least until a clear
need for it is demonstrated...

Matthias


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