Created on 1999-08-15.00:00:00 last changed 171 months ago
Rationale:
Although perhaps an unfortunate design decision, the omission is not a defect in the current standard. A future standard may wish to add the missing operators.
26.5.2.6 defines augmented assignment operators valarray<T>::op=(const T&), but fails to provide corresponding versions for the helper classes. Thus making the following illegal:
#include <valarray> int main() { std::valarray<double> v(3.14, 1999); v[99] *= 2.0; // Ok std::slice s(0, 50, 2); v[s] *= 2.0; // ERROR }
I can't understand the intent of that omission. It makes the valarray library less intuitive and less useful.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg1803 |
1999-08-15 00:00:00 | admin | create |