Title
insert iterators can move from lvalues
Status
nad
Section
[insert.iterator]
Submitter
Alisdair Meredith

Created on 2008-09-24.00:00:00 last changed 172 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Recommend NAD, addressed by N2844.

Date: 2010-10-21.18:28:33

[ Batavia (2009-05): ]

We agree that this has been resolved in the latest Working Draft. Move to NAD.

Date: 2010-10-21.18:28:33

[ Post Summit, Alisdair adds: ]

Both comment and issue have been resolved by the adoption of N2844 (rvalue references safety fix) at the last meeting.

Suggest resolve as NAD Editorial with a reference to the paper.

Date: 2008-09-24.00:00:00

Addresses UK 282

The requires clause on the const T & overloads in back_insert_iterator/front_insert_iterator/insert_iterator mean that the assignment operator will implicitly move from lvalues of a move-only type.

Suggested resolutions are:

  1. Add another overload with a negative constraint on copy-constructible and flag it "= delete".
  2. Drop the copy-constructible overload entirely and rely on perfect forwarding to catch move issues one level deeper.
  3. This is a fundamental problem in move-syntax that relies on the presence of two overloads, and we need to look more deeply into this area as a whole - do not solve this issue in isolation.
History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg4291
2010-10-21 18:28:33adminsetmessages: + msg4290
2010-10-21 18:28:33adminsetmessages: + msg4289
2008-09-24 00:00:00admincreate