1259. Should initializer-list constructors move elements?

Section: 24.2.4 [sequence.reqmts] Status: NAD Submitter: Sean Hunt Opened: 2009-11-05 Last modified: 2016-01-28 10:19:27 UTC

Priority: Not Prioritized

View other active issues in [sequence.reqmts].

View all other issues in [sequence.reqmts].

View all issues with NAD status.


According to 24.2.4 [sequence.reqmts], X(il) is equivalent to X(il.begin(), il.end()). Should it instead be equivalent to X(move_iterator(il.begin()), move_iterator(il.end())) so that needless copies are not made? This doesn't seem ideal either - it may make more sense to provide two overloads for the constructor, one for move and one for copy.

[ 2009-11-10 Howard adds: ]

I've moved this issue to Tentatively NAD after 5 positive votes on c++std-lib, and added a rationale below.

Proposed resolution:


There is no consensus at this time within EWG or CWG to make the required language changes. Therefore this is not something that the LWG can even consider. Should such language changes be made for a future standard, no doubt there would need to be an accompanying library impact survey.