A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/LWG/issue1243 below:

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

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

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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4