Topic: change InputIterator concept requirements to move,


Author: brlongbons@gmail.com
Date: Sat, 2 Mar 2013 12:46:15 -0800 (PST)
Raw View
------=_Part_214_6314818.1362257175050
Content-Type: text/plain; charset=ISO-8859-1

Currently, implementations of InputIterator are required to silently enter
an invalid state after being copied from, and so is prone to the same kind
of programmer mistakes that auto_ptr is.

It would be better if InputIterator was excepted from the requirement that
all Iterators must satisfy CopyConstructible and CopyAssignable (From
n3337, it is 24.2.2/2).

This can be done without breaking backward compatibility:
1. Existing implementations of standard library algorithms that accept
InputIterators are rewritten to work with move-only.
2. Existing standard library implementations iterators are NOT rewritten,
however the copy ctors are deprecated.
3.  Implementations could provide a technique to completely remove
deprecated things, but it's may be a bad idea to make anything in headers
conditional as this plays poorly with modules.

--

---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en.



------=_Part_214_6314818.1362257175050
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div>Currently, implementations of InputIterator&nbsp;are required to silen=
tly enter an invalid state after being copied from, and so is prone to the =
same kind of programmer mistakes that auto_ptr is.</div><div><br></div><div=
>It would be better if InputIterator was excepted from the requirement that=
 all Iterators must satisfy CopyConstructible and CopyAssignable (From n333=
7, it is 24.2.2/2).</div><div><br></div><div>This can be done without break=
ing backward compatibility:</div><div>1. Existing implementations of standa=
rd library algorithms that accept InputIterators are rewritten to work with=
 move-only.</div><div>2. Existing standard library implementations iterator=
s are NOT rewritten, however the copy ctors are deprecated.</div><div>3.&nb=
sp; Implementations could provide a technique to completely remove deprecat=
ed things, but it's may be a bad idea to make anything in headers condition=
al as this plays poorly with modules.</div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
&nbsp;<br />
&nbsp;<br />

------=_Part_214_6314818.1362257175050--

.