1243. Missing operator+= (initializer_list<T>) for valarray

Section: [valarray.cassign] Status: NAD Submitter: Daniel Krügler Opened: 2009-10-22 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [valarray.cassign].

View all issues with NAD status.


Addresses JP 64

During the additions of initializer_list overloads basic_string added:

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


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

was not defined.

[ 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).

[ 2009-10 Santa Cruz: ]

Mark as NAD. Request has been withdrawn by NB.

Proposed resolution:

Add to [valarray.cassign]:

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