Title
Missing operator+= (initializer_list<T>) for valarray
Status
nad
Section
[valarray.cassign]
Submitter
Daniel Krügler

Created on 2009-10-22.00:00:00 last changed 171 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Add to [valarray.cassign]:

valarray<T>& operator+= (initializer_list<T>);
Date: 2010-10-21.18:28:33

[ 2009-10 Santa Cruz: ]

Mark as NAD. Request has been withdrawn by NB.

Date: 2010-10-21.18:28:33

[ Daniel adds on opening: ]

Recommend NAD. The operator+= overload of basic_string behaves as-if calling append, which is completely different in meaning as the existing operator+= overloads in valarray which just sum the value or values to the existing elements. The suggestion to add a corresponding append function to valarray was not considered as appropriate and the request was withdrawn (c++std-lib-24968).

Date: 2009-10-22.00:00:00

Addresses JP 64

During the additions of initializer_list overloads basic_string added:

basic_string& operator+=(initializer_list<charT>);

but

valarray<T>& operator+= (initializer_list<T>);

was not defined.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg1283
2010-10-21 18:28:33adminsetmessages: + msg1282
2010-10-21 18:28:33adminsetmessages: + msg1281
2009-10-22 00:00:00admincreate