This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD status.

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

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

Priority: Not Prioritized

View all other issues in [valarray.cassign].

View all issues with NAD status.

Discussion:

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.

[ 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 26.7.2.7 [valarray.cassign]:

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