Topic: iterators of contiguous containers should always


Author: "d25fe0be@outlook.com" <d25fe0be@outlook.com>
Date: Sat, 19 Aug 2017 07:53:30 +0000
Raw View
> On 19 Aug 2017, at 15:51, euloanty@live.com wrote:
>
> I think iterators for contiguous containers (std::vector<T>,std::array<T>,std::basic_string<T>) should all be T*.

How about std::vector<bool>?
>
> template<typename T>
> class vector
> {
> public:
>       using pointer = T*;
>       using iterator = pointer;
> };
>
>
> It could solve following issues:
> 1.passing through C APIs
> 2.contiguous Iterator/Container issue(if Container<T>::iterator is T*, it is a contiguous container)
> 3.converting one container to another easily
> 4.easy to learn and understand
>
> --
> 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.
> To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9fbe1657-287e-4177-bfad-c2fd65cab63a%40isocpp.org.

--
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/HK2PR03MB0675F86C3B8DE10947C323698B810%40HK2PR03MB0675.apcprd03.prod.outlook.com.

.


Author: =?UTF-8?Q?Micha=C5=82_Dominiak?= <griwes@griwes.info>
Date: Sat, 19 Aug 2017 07:54:15 +0000
Raw View
--f403045f7150f816bd0557168db7
Content-Type: text/plain; charset="UTF-8"

Good job disallowing implementations to introduce debug mode iterators.

On Sat, Aug 19, 2017 at 9:51 AM <euloanty@live.com> wrote:

> I think iterators for contiguous containers
> (std::vector<T>,std::array<T>,std::basic_string<T>) should all be T*.
>
> template<typename T>
> class vector
> {
> public:
>       using pointer = T*;
>       using iterator = pointer;
> };
>
>
> It could solve following issues:
> 1.passing through C APIs
> 2.contiguous Iterator/Container issue(if Container<T>::iterator is T*, it
> is a contiguous container)
> 3.converting one container to another easily
> 4.easy to learn and understand
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9fbe1657-287e-4177-bfad-c2fd65cab63a%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9fbe1657-287e-4177-bfad-c2fd65cab63a%40isocpp.org?utm_medium=email&utm_source=footer>
> .
>

--
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAPCFJdSi0xryiFDmWvg5xVumfrwJkPmHuVp7b9NpJNSjp8gV8A%40mail.gmail.com.

--f403045f7150f816bd0557168db7
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Good job disallowing implementations to introduce debug mo=
de iterators.<br><div class=3D"gmail_quote"><div dir=3D"ltr"><br></div><div=
 dir=3D"ltr">On Sat, Aug 19, 2017 at 9:51 AM &lt;<a href=3D"mailto:euloanty=
@live.com" target=3D"_blank">euloanty@live.com</a>&gt; wrote:<br></div><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #c=
cc solid;padding-left:1ex"><div dir=3D"ltr"><div>I think iterators for cont=
iguous containers (std::vector&lt;T&gt;,std::array&lt;T&gt;,std::basic_stri=
ng&lt;T&gt;) should all be T*.</div><div><br></div><div>template&lt;typenam=
e T&gt;</div><div>class vector</div><div>{</div><div>public:</div><div>=C2=
=A0 =C2=A0 =C2=A0 using pointer =3D T*;</div><div>=C2=A0 =C2=A0 =C2=A0 usin=
g iterator =3D pointer;</div><div>};</div><div><br></div><div><br></div><di=
v>It could solve following issues:</div><div>1.passing through C APIs</div>=
<div>2.contiguous Iterator/Container issue(if Container&lt;T&gt;::iterator =
is T*, it is a contiguous container)</div><div>3.converting one container t=
o another easily</div><div>4.easy to learn and understand</div></div>

<p></p>

-- <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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/9fbe1657-287e-4177-bfad-c2fd65cab63a%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9fbe1657-287e-=
4177-bfad-c2fd65cab63a%40isocpp.org</a>.<br>
</blockquote></div></div>

<p></p>

-- <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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAPCFJdSi0xryiFDmWvg5xVumfrwJkPmHuVp7=
b9NpJNSjp8gV8A%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAPCFJdSi0xryiFDm=
Wvg5xVumfrwJkPmHuVp7b9NpJNSjp8gV8A%40mail.gmail.com</a>.<br />

--f403045f7150f816bd0557168db7--

.


Author: euloanty@live.com
Date: Sat, 19 Aug 2017 00:57:35 -0700 (PDT)
Raw View
------=_Part_3828_302331839.1503129455512
Content-Type: multipart/alternative;
 boundary="----=_Part_3829_1151855895.1503129455512"

------=_Part_3829_1151855895.1503129455512
Content-Type: text/plain; charset="UTF-8"

Besides:

5. Reduce Compilation Time
6. Easy to implement a Contiguous Container for libraries.

On Saturday, August 19, 2017 at 3:51:12 PM UTC+8, ejsvifq mabmip wrote:

> I think iterators for contiguous containers
> (std::vector<T>,std::array<T>,std::basic_string<T>) should all be T*.
>
> template<typename T>
> class vector
> {
> public:
>       using pointer = T*;
>       using iterator = pointer;
> };
>
>
> It could solve following issues:
> 1.passing through C APIs
> 2.contiguous Iterator/Container issue(if Container<T>::iterator is T*, it
> is a contiguous container)
> 3.converting one container to another easily
> 4.easy to learn and understand
>

--
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/38afde01-86dc-42af-9c1d-db9ffd7bd64d%40isocpp.org.

------=_Part_3829_1151855895.1503129455512
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Besides:</div><div><br></div><div>5. Reduce Compilati=
on Time</div><div>6. Easy to implement a Contiguous Container for libraries=
..</div><div><br>On Saturday, August 19, 2017 at 3:51:12 PM UTC+8, ejsvifq m=
abmip wrote:</div><blockquote class=3D"gmail_quote" style=3D"margin: 0;marg=
in-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"=
ltr"><div>I think iterators for contiguous containers (std::vector&lt;T&gt;=
,std::array&lt;T&gt;,<wbr>std::basic_string&lt;T&gt;) should all be T*.</di=
v><div><br></div><div>template&lt;typename T&gt;</div><div>class vector</di=
v><div>{</div><div>public:</div><div>=C2=A0 =C2=A0 =C2=A0 using pointer =3D=
 T*;</div><div>=C2=A0 =C2=A0 =C2=A0 using iterator =3D pointer;</div><div>}=
;</div><div><br></div><div><br></div><div>It could solve following issues:<=
/div><div>1.passing through C APIs</div><div>2.contiguous Iterator/Containe=
r issue(if Container&lt;T&gt;::iterator is T*, it is a contiguous container=
)</div><div>3.converting one container to another easily</div><div>4.easy t=
o learn and understand</div></div></blockquote></div>

<p></p>

-- <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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/38afde01-86dc-42af-9c1d-db9ffd7bd64d%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/38afde01-86dc-42af-9c1d-db9ffd7bd64d=
%40isocpp.org</a>.<br />

------=_Part_3829_1151855895.1503129455512--

------=_Part_3828_302331839.1503129455512--

.


Author: euloanty@live.com
Date: Sat, 19 Aug 2017 01:08:48 -0700 (PDT)
Raw View
------=_Part_3698_437470503.1503130128256
Content-Type: multipart/alternative;
 boundary="----=_Part_3699_1952105602.1503130128257"

------=_Part_3699_1952105602.1503130128257
Content-Type: text/plain; charset="UTF-8"

vector<bool> is not a contiguous container.


On Saturday, August 19, 2017 at 3:53:35 PM UTC+8, d25f...@outlook.com wrote:

>
> > On 19 Aug 2017, at 15:51, eulo...@live.com <javascript:> wrote:
> >
> > I think iterators for contiguous containers
> (std::vector<T>,std::array<T>,std::basic_string<T>) should all be T*.
>
> How about std::vector<bool>?
> >
> > template<typename T>
> > class vector
> > {
> > public:
> >       using pointer = T*;
> >       using iterator = pointer;
> > };
> >
> >
> > It could solve following issues:
> > 1.passing through C APIs
> > 2.contiguous Iterator/Container issue(if Container<T>::iterator is T*,
> it is a contiguous container)
> > 3.converting one container to another easily
> > 4.easy to learn and understand
> >
> > --
> > 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-proposal...@isocpp.org <javascript:>.
> > To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>
> > To view this discussion on the web visit
> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9fbe1657-287e-4177-bfad-c2fd65cab63a%40isocpp.org.
>
>
>

--
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/ecfd8ce9-6a59-435c-b7e5-a1b7daa82b94%40isocpp.org.

------=_Part_3699_1952105602.1503130128257
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>vector&lt;bool&gt; is not a contiguous container.</di=
v><div><br></div><div><br>On Saturday, August 19, 2017 at 3:53:35 PM UTC+8,=
 d25f...@outlook.com wrote:</div><blockquote class=3D"gmail_quote" style=3D=
"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex=
;">
<br>&gt; On 19 Aug 2017, at 15:51, <a onmousedown=3D"this.href=3D&#39;javas=
cript:&#39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;retu=
rn true;" href=3D"javascript:" target=3D"_blank" rel=3D"nofollow" gdf-obfus=
cated-mailto=3D"YH5ATqyHCgAJ">eulo...@live.com</a> wrote:
<br>&gt;=20
<br>&gt; I think iterators for contiguous containers (std::vector&lt;T&gt;,=
std::array&lt;T&gt;,<wbr>std::basic_string&lt;T&gt;) should all be T*.
<br>
<br>How about std::vector&lt;bool&gt;?
<br>&gt;=20
<br>&gt; template&lt;typename T&gt;
<br>&gt; class vector
<br>&gt; {
<br>&gt; public:
<br>&gt; =C2=A0 =C2=A0 =C2=A0 using pointer =3D T*;
<br>&gt; =C2=A0 =C2=A0 =C2=A0 using iterator =3D pointer;
<br>&gt; };
<br>&gt;=20
<br>&gt;=20
<br>&gt; It could solve following issues:
<br>&gt; 1.passing through C APIs
<br>&gt; 2.contiguous Iterator/Container issue(if Container&lt;T&gt;::itera=
tor is T*, it is a contiguous container)
<br>&gt; 3.converting one container to another easily
<br>&gt; 4.easy to learn and understand
<br>&gt;=20
<br>&gt; --=20
<br>&gt; You received this message because you are subscribed to the Google=
 Groups &quot;ISO C++ Standard - Future Proposals&quot; group.
<br>&gt; To unsubscribe from this group and stop receiving emails from it, =
send an email to <a onmousedown=3D"this.href=3D&#39;javascript:&#39;;return=
 true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return true;" href=3D"=
javascript:" target=3D"_blank" rel=3D"nofollow" gdf-obfuscated-mailto=3D"YH=
5ATqyHCgAJ">std-proposal...@<wbr>isocpp.org</a>.
<br>&gt; To post to this group, send email to <a onmousedown=3D"this.href=
=3D&#39;javascript:&#39;;return true;" onclick=3D"this.href=3D&#39;javascri=
pt:&#39;;return true;" href=3D"javascript:" target=3D"_blank" rel=3D"nofoll=
ow" gdf-obfuscated-mailto=3D"YH5ATqyHCgAJ">std-pr...@isocpp.org</a>.
<br>&gt; To view this discussion on the web visit <a onmousedown=3D"this.hr=
ef=3D&#39;https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9fbe=
1657-287e-4177-bfad-c2fd65cab63a%40isocpp.org&#39;;return true;" onclick=3D=
"this.href=3D&#39;https://groups.google.com/a/isocpp.org/d/msgid/std-propos=
als/9fbe1657-287e-4177-bfad-c2fd65cab63a%40isocpp.org&#39;;return true;" hr=
ef=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9fbe1657=
-287e-4177-bfad-c2fd65cab63a%40isocpp.org" target=3D"_blank" rel=3D"nofollo=
w">https://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/9=
fbe1657-287e-4177-<wbr>bfad-c2fd65cab63a%40isocpp.org</a><wbr>.
<br>
<br></blockquote></div>

<p></p>

-- <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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/ecfd8ce9-6a59-435c-b7e5-a1b7daa82b94%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/ecfd8ce9-6a59-435c-b7e5-a1b7daa82b94=
%40isocpp.org</a>.<br />

------=_Part_3699_1952105602.1503130128257--

------=_Part_3698_437470503.1503130128256--

.


Author: euloanty@live.com
Date: Sat, 19 Aug 2017 01:09:23 -0700 (PDT)
Raw View
------=_Part_3845_1773543485.1503130163935
Content-Type: multipart/alternative;
 boundary="----=_Part_3846_769571729.1503130163935"

------=_Part_3846_769571729.1503130163935
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

T* are always more easy for debugger since it is simple.

On Saturday, August 19, 2017 at 3:54:28 PM UTC+8, Micha=C5=82 Dominiak wrot=
e:
>
> Good job disallowing implementations to introduce debug mode iterators.
>
> On Sat, Aug 19, 2017 at 9:51 AM <eulo...@live.com <javascript:>> wrote:
>
>> I think iterators for contiguous containers=20
>> (std::vector<T>,std::array<T>,std::basic_string<T>) should all be T*.
>>
>> template<typename T>
>> class vector
>> {
>> public:
>>       using pointer =3D T*;
>>       using iterator =3D pointer;
>> };
>>
>>
>> It could solve following issues:
>> 1.passing through C APIs
>> 2.contiguous Iterator/Container issue(if Container<T>::iterator is T*, i=
t=20
>> is a contiguous container)
>> 3.converting one container to another easily
>> 4.easy to learn and understand
>>
>> --=20
>> You received this message because you are subscribed to the Google Group=
s=20
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n=20
>> email to std-proposal...@isocpp.org <javascript:>.
>> To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>> To view this discussion on the web visit=20
>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9fbe1657-28=
7e-4177-bfad-c2fd65cab63a%40isocpp.org=20
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9fbe1657-2=
87e-4177-bfad-c2fd65cab63a%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoo=
ter>
>> .
>>
>

--=20
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 e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/c9cd54b2-84c0-4278-82fc-832f5e961407%40isocpp.or=
g.

------=_Part_3846_769571729.1503130163935
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">T* are always more easy for debugger since it is simple.<b=
r><br>On Saturday, August 19, 2017 at 3:54:28 PM UTC+8, Micha=C5=82 Dominia=
k wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0=
..8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">Good =
job disallowing implementations to introduce debug mode iterators.<br><div =
class=3D"gmail_quote"><div dir=3D"ltr"><br></div><div dir=3D"ltr">On Sat, A=
ug 19, 2017 at 9:51 AM &lt;<a onmousedown=3D"this.href=3D&#39;javascript:&#=
39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return true;=
" href=3D"javascript:" target=3D"_blank" rel=3D"nofollow" gdf-obfuscated-ma=
ilto=3D"eOtrw7iHCgAJ">eulo...@live.com</a>&gt; wrote:<br></div><blockquote =
class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid=
;padding-left:1ex"><div dir=3D"ltr"><div>I think iterators for contiguous c=
ontainers (std::vector&lt;T&gt;,std::array&lt;T&gt;,<wbr>std::basic_string&=
lt;T&gt;) should all be T*.</div><div><br></div><div>template&lt;typename T=
&gt;</div><div>class vector</div><div>{</div><div>public:</div><div>=C2=A0 =
=C2=A0 =C2=A0 using pointer =3D T*;</div><div>=C2=A0 =C2=A0 =C2=A0 using it=
erator =3D pointer;</div><div>};</div><div><br></div><div><br></div><div>It=
 could solve following issues:</div><div>1.passing through C APIs</div><div=
>2.contiguous Iterator/Container issue(if Container&lt;T&gt;::iterator is T=
*, it is a contiguous container)</div><div>3.converting one container to an=
other easily</div><div>4.easy to learn and understand</div></div>

<p></p>

-- <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 <a onmousedown=3D"this.href=3D&#39;javascript:&#39;;return true;" o=
nclick=3D"this.href=3D&#39;javascript:&#39;;return true;" href=3D"javascrip=
t:" target=3D"_blank" rel=3D"nofollow" gdf-obfuscated-mailto=3D"eOtrw7iHCgA=
J">std-proposal...@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a onmousedown=3D"this.href=3D&#39;jav=
ascript:&#39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;re=
turn true;" href=3D"javascript:" target=3D"_blank" rel=3D"nofollow" gdf-obf=
uscated-mailto=3D"eOtrw7iHCgAJ">std-pr...@isocpp.org</a>.<br>
To view this discussion on the web visit <a onmousedown=3D"this.href=3D&#39=
;https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9fbe1657-287e=
-4177-bfad-c2fd65cab63a%40isocpp.org?utm_medium\x3demail\x26utm_source\x3df=
ooter&#39;;return true;" onclick=3D"this.href=3D&#39;https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/9fbe1657-287e-4177-bfad-c2fd65cab63a=
%40isocpp.org?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;=
" href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9fbe=
1657-287e-4177-bfad-c2fd65cab63a%40isocpp.org?utm_medium=3Demail&amp;utm_so=
urce=3Dfooter" target=3D"_blank" rel=3D"nofollow">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/9fbe1657-287e-4177-<wbr>bfad-=
c2fd65cab63a%40isocpp.org</a><wbr>.<br>
</blockquote></div></div>
</blockquote></div>

<p></p>

-- <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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/c9cd54b2-84c0-4278-82fc-832f5e961407%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/c9cd54b2-84c0-4278-82fc-832f5e961407=
%40isocpp.org</a>.<br />

------=_Part_3846_769571729.1503130163935--

------=_Part_3845_1773543485.1503130163935--

.


Author: =?UTF-8?Q?Jonathan_M=c3=bcller?= <jonathanmueller.dev@gmail.com>
Date: Sat, 19 Aug 2017 10:10:20 +0200
Raw View
On 19.08.2017 10:09, euloanty@live.com wrote:
> T* are always more easy for debugger since it is simple.

A debug mode iterator is an iterator with additional metadata that does
assertions in debug mode to prevent iterating past the end, comparing
iterators from different containers etc.

--
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/bb691a49-6841-4f2d-1433-bbc0dbccc056%40gmail.com.

.


Author: euloanty@live.com
Date: Sat, 19 Aug 2017 01:12:23 -0700 (PDT)
Raw View
------=_Part_3704_1290922776.1503130343658
Content-Type: multipart/alternative;
 boundary="----=_Part_3705_267687189.1503130343658"

------=_Part_3705_267687189.1503130343658
Content-Type: text/plain; charset="UTF-8"

suppose you have a vector<bool> v;

It does not even have v.data(). vector<bool> is still a random access
container, not a contiguous container

http://en.cppreference.com/w/cpp/container/vector_bool

On Saturday, August 19, 2017 at 3:53:35 PM UTC+8, d25f...@outlook.com wrote:

>
> > On 19 Aug 2017, at 15:51, eulo...@live.com <javascript:> wrote:
> >
> > I think iterators for contiguous containers
> (std::vector<T>,std::array<T>,std::basic_string<T>) should all be T*.
>
> How about std::vector<bool>?
> >
> > template<typename T>
> > class vector
> > {
> > public:
> >       using pointer = T*;
> >       using iterator = pointer;
> > };
> >
> >
> > It could solve following issues:
> > 1.passing through C APIs
> > 2.contiguous Iterator/Container issue(if Container<T>::iterator is T*,
> it is a contiguous container)
> > 3.converting one container to another easily
> > 4.easy to learn and understand
> >
> > --
> > 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-proposal...@isocpp.org <javascript:>.
> > To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>
> > To view this discussion on the web visit
> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9fbe1657-287e-4177-bfad-c2fd65cab63a%40isocpp.org.
>
>
>

--
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/4857cce3-644b-49d0-9be7-73f0e639cb8c%40isocpp.org.

------=_Part_3705_267687189.1503130343658
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>suppose you have a vector&lt;bool&gt; v;</div><div><b=
r></div><div>It does not even have v.data(). vector&lt;bool&gt; is still a =
random access container, not a contiguous container</div><div><br></div><di=
v>http://en.cppreference.com/w/cpp/container/vector_bool</div><div><br></di=
v><div>On Saturday, August 19, 2017 at 3:53:35 PM UTC+8, d25f...@outlook.co=
m wrote:</div><blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-l=
eft: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">
<br>&gt; On 19 Aug 2017, at 15:51, <a onmousedown=3D"this.href=3D&#39;javas=
cript:&#39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;retu=
rn true;" href=3D"javascript:" target=3D"_blank" rel=3D"nofollow" gdf-obfus=
cated-mailto=3D"YH5ATqyHCgAJ">eulo...@live.com</a> wrote:
<br>&gt;=20
<br>&gt; I think iterators for contiguous containers (std::vector&lt;T&gt;,=
std::array&lt;T&gt;,<wbr>std::basic_string&lt;T&gt;) should all be T*.
<br>
<br>How about std::vector&lt;bool&gt;?
<br>&gt;=20
<br>&gt; template&lt;typename T&gt;
<br>&gt; class vector
<br>&gt; {
<br>&gt; public:
<br>&gt; =C2=A0 =C2=A0 =C2=A0 using pointer =3D T*;
<br>&gt; =C2=A0 =C2=A0 =C2=A0 using iterator =3D pointer;
<br>&gt; };
<br>&gt;=20
<br>&gt;=20
<br>&gt; It could solve following issues:
<br>&gt; 1.passing through C APIs
<br>&gt; 2.contiguous Iterator/Container issue(if Container&lt;T&gt;::itera=
tor is T*, it is a contiguous container)
<br>&gt; 3.converting one container to another easily
<br>&gt; 4.easy to learn and understand
<br>&gt;=20
<br>&gt; --=20
<br>&gt; You received this message because you are subscribed to the Google=
 Groups &quot;ISO C++ Standard - Future Proposals&quot; group.
<br>&gt; To unsubscribe from this group and stop receiving emails from it, =
send an email to <a onmousedown=3D"this.href=3D&#39;javascript:&#39;;return=
 true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return true;" href=3D"=
javascript:" target=3D"_blank" rel=3D"nofollow" gdf-obfuscated-mailto=3D"YH=
5ATqyHCgAJ">std-proposal...@<wbr>isocpp.org</a>.
<br>&gt; To post to this group, send email to <a onmousedown=3D"this.href=
=3D&#39;javascript:&#39;;return true;" onclick=3D"this.href=3D&#39;javascri=
pt:&#39;;return true;" href=3D"javascript:" target=3D"_blank" rel=3D"nofoll=
ow" gdf-obfuscated-mailto=3D"YH5ATqyHCgAJ">std-pr...@isocpp.org</a>.
<br>&gt; To view this discussion on the web visit <a onmousedown=3D"this.hr=
ef=3D&#39;https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9fbe=
1657-287e-4177-bfad-c2fd65cab63a%40isocpp.org&#39;;return true;" onclick=3D=
"this.href=3D&#39;https://groups.google.com/a/isocpp.org/d/msgid/std-propos=
als/9fbe1657-287e-4177-bfad-c2fd65cab63a%40isocpp.org&#39;;return true;" hr=
ef=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9fbe1657=
-287e-4177-bfad-c2fd65cab63a%40isocpp.org" target=3D"_blank" rel=3D"nofollo=
w">https://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/9=
fbe1657-287e-4177-<wbr>bfad-c2fd65cab63a%40isocpp.org</a><wbr>.
<br>
<br></blockquote></div>

<p></p>

-- <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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/4857cce3-644b-49d0-9be7-73f0e639cb8c%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/4857cce3-644b-49d0-9be7-73f0e639cb8c=
%40isocpp.org</a>.<br />

------=_Part_3705_267687189.1503130343658--

------=_Part_3704_1290922776.1503130343658--

.


Author: euloanty@live.com
Date: Sat, 19 Aug 2017 01:13:29 -0700 (PDT)
Raw View
------=_Part_3695_86701904.1503130409384
Content-Type: multipart/alternative;
 boundary="----=_Part_3696_1091736300.1503130409385"

------=_Part_3696_1091736300.1503130409385
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Debug mode iterators should be broken. They are pointless

On Saturday, August 19, 2017 at 3:54:28 PM UTC+8, Micha=C5=82 Dominiak wrot=
e:
>
> Good job disallowing implementations to introduce debug mode iterators.
>
> On Sat, Aug 19, 2017 at 9:51 AM <eulo...@live.com <javascript:>> wrote:
>
>> I think iterators for contiguous containers=20
>> (std::vector<T>,std::array<T>,std::basic_string<T>) should all be T*.
>>
>> template<typename T>
>> class vector
>> {
>> public:
>>       using pointer =3D T*;
>>       using iterator =3D pointer;
>> };
>>
>>
>> It could solve following issues:
>> 1.passing through C APIs
>> 2.contiguous Iterator/Container issue(if Container<T>::iterator is T*, i=
t=20
>> is a contiguous container)
>> 3.converting one container to another easily
>> 4.easy to learn and understand
>>
>> --=20
>> You received this message because you are subscribed to the Google Group=
s=20
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n=20
>> email to std-proposal...@isocpp.org <javascript:>.
>> To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>> To view this discussion on the web visit=20
>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9fbe1657-28=
7e-4177-bfad-c2fd65cab63a%40isocpp.org=20
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9fbe1657-2=
87e-4177-bfad-c2fd65cab63a%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoo=
ter>
>> .
>>
>

--=20
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 e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/0841b337-11a7-465e-9b33-1814155c46d3%40isocpp.or=
g.

------=_Part_3696_1091736300.1503130409385
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Debug mode iterators should be broken. They are pointless<=
br><br>On Saturday, August 19, 2017 at 3:54:28 PM UTC+8, Micha=C5=82 Domini=
ak wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: =
0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">Good=
 job disallowing implementations to introduce debug mode iterators.<br><div=
 class=3D"gmail_quote"><div dir=3D"ltr"><br></div><div dir=3D"ltr">On Sat, =
Aug 19, 2017 at 9:51 AM &lt;<a onmousedown=3D"this.href=3D&#39;javascript:&=
#39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return true=
;" href=3D"javascript:" target=3D"_blank" rel=3D"nofollow" gdf-obfuscated-m=
ailto=3D"eOtrw7iHCgAJ">eulo...@live.com</a>&gt; wrote:<br></div><blockquote=
 class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc soli=
d;padding-left:1ex"><div dir=3D"ltr"><div>I think iterators for contiguous =
containers (std::vector&lt;T&gt;,std::array&lt;T&gt;,<wbr>std::basic_string=
&lt;T&gt;) should all be T*.</div><div><br></div><div>template&lt;typename =
T&gt;</div><div>class vector</div><div>{</div><div>public:</div><div>=C2=A0=
 =C2=A0 =C2=A0 using pointer =3D T*;</div><div>=C2=A0 =C2=A0 =C2=A0 using i=
terator =3D pointer;</div><div>};</div><div><br></div><div><br></div><div>I=
t could solve following issues:</div><div>1.passing through C APIs</div><di=
v>2.contiguous Iterator/Container issue(if Container&lt;T&gt;::iterator is =
T*, it is a contiguous container)</div><div>3.converting one container to a=
nother easily</div><div>4.easy to learn and understand</div></div>

<p></p>

-- <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 <a onmousedown=3D"this.href=3D&#39;javascript:&#39;;return true;" o=
nclick=3D"this.href=3D&#39;javascript:&#39;;return true;" href=3D"javascrip=
t:" target=3D"_blank" rel=3D"nofollow" gdf-obfuscated-mailto=3D"eOtrw7iHCgA=
J">std-proposal...@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a onmousedown=3D"this.href=3D&#39;jav=
ascript:&#39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;re=
turn true;" href=3D"javascript:" target=3D"_blank" rel=3D"nofollow" gdf-obf=
uscated-mailto=3D"eOtrw7iHCgAJ">std-pr...@isocpp.org</a>.<br>
To view this discussion on the web visit <a onmousedown=3D"this.href=3D&#39=
;https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9fbe1657-287e=
-4177-bfad-c2fd65cab63a%40isocpp.org?utm_medium\x3demail\x26utm_source\x3df=
ooter&#39;;return true;" onclick=3D"this.href=3D&#39;https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/9fbe1657-287e-4177-bfad-c2fd65cab63a=
%40isocpp.org?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;=
" href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9fbe=
1657-287e-4177-bfad-c2fd65cab63a%40isocpp.org?utm_medium=3Demail&amp;utm_so=
urce=3Dfooter" target=3D"_blank" rel=3D"nofollow">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/9fbe1657-287e-4177-<wbr>bfad-=
c2fd65cab63a%40isocpp.org</a><wbr>.<br>
</blockquote></div></div>
</blockquote></div>

<p></p>

-- <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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/0841b337-11a7-465e-9b33-1814155c46d3%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/0841b337-11a7-465e-9b33-1814155c46d3=
%40isocpp.org</a>.<br />

------=_Part_3696_1091736300.1503130409385--

------=_Part_3695_86701904.1503130409384--

.


Author: Bo Persson <bop@gmb.dk>
Date: Sat, 19 Aug 2017 16:17:52 +0200
Raw View
On 2017-08-19 12:23, euloanty@live.com wrote:
>
>
> using pointer = _std::allocator_traits_
> <http://en.cppreference.com/w/cpp/memory/allocator_traits><Allocator>::pointer;
> using iterator = pointer;
>
> So you can still define your "debug" mode in allocator.
>

It's not just about debug iterators.

Early implementations of the C++ standard library DID use T* as an
iterator for vector<T>. But they stopped, because of all kinds of
problems that caused.

Not only can the user mix pointers and iterators, they can also
accidentally pass ANY int* as a parameter to a vector<int> member
function expecting an iterator. Or try to delete the iterator, which
compiles when it is a T* but crashes at runtime.

Lots of such little problems disappeared when library implementers
changed vector::iterator to a proper class and took advantage of the C++
type system to sort out various bugs in user code.

The possiblity of debug iterators was a bonus that appeared long after
all iterators were classes.

Now you want to persuade them to go back to "the bad old days". That
will not be easy!



     Bo Persson


--
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/on9hab%249jl%241%40blaine.gmane.org.

.


Author: Nicol Bolas <jmckesson@gmail.com>
Date: Sat, 19 Aug 2017 10:11:55 -0700 (PDT)
Raw View
------=_Part_4364_457898727.1503162715313
Content-Type: multipart/alternative;
 boundary="----=_Part_4365_781439417.1503162715313"

------=_Part_4365_781439417.1503162715313
Content-Type: text/plain; charset="UTF-8"


>
> > On 19 Aug 2017, at 15:51, eulo...@live.com <javascript:> wrote:
> >
> > I think iterators for contiguous containers
> (std::vector<T>,std::array<T>,std::basic_string<T>) should all be T*.
>

No. It would be far better to have iterators from contiguous containers be
*convertible* to pointers. Either through implicit conversion both ways or
via some explicit interface function.

Either way, this would also be a useful way to tell if an iterator is
contiguous, which is something we really need.

--
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/0b9174dc-bc26-4317-b6f0-54750bdf55cb%40isocpp.org.

------=_Part_4365_781439417.1503162715313
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">
&gt; On 19 Aug 2017, at 15:51, <a href=3D"javascript:" target=3D"_blank" gd=
f-obfuscated-mailto=3D"YH5ATqyHCgAJ" rel=3D"nofollow" onmousedown=3D"this.h=
ref=3D&#39;javascript:&#39;;return true;" onclick=3D"this.href=3D&#39;javas=
cript:&#39;;return true;">eulo...@live.com</a> wrote:
<br>&gt;=20
<br>&gt; I think iterators for contiguous containers (std::vector&lt;T&gt;,=
std::array&lt;T&gt;,<wbr>std::basic_string&lt;T&gt;) should all be T*.
<br></blockquote><div><br>No. It would be far better to have iterators from=
 contiguous containers be <i>convertible</i> to pointers. Either through im=
plicit conversion both ways or via some explicit interface function.<br><br=
>Either way, this would also be a useful way to tell if an iterator is cont=
iguous, which is something we really need.<br></div></div>

<p></p>

-- <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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/0b9174dc-bc26-4317-b6f0-54750bdf55cb%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/0b9174dc-bc26-4317-b6f0-54750bdf55cb=
%40isocpp.org</a>.<br />

------=_Part_4365_781439417.1503162715313--

------=_Part_4364_457898727.1503162715313--

.


Author: Nevin Liber <nevin@eviloverlord.com>
Date: Sat, 19 Aug 2017 12:28:43 -0500
Raw View
--94eb2c03148e3489c505571e96e0
Content-Type: text/plain; charset="UTF-8"

On Sat, Aug 19, 2017 at 12:11 PM, Nicol Bolas <jmckesson@gmail.com> wrote:

> > On 19 Aug 2017, at 15:51, eulo...@live.com wrote:
>> >
>> > I think iterators for contiguous containers
>> (std::vector<T>,std::array<T>,std::basic_string<T>) should all be T*.
>>
>
> No. It would be far better to have iterators from contiguous containers be
> *convertible* to pointers. Either through implicit conversion both ways
> or via some explicit interface function.
>

Using a cast to convert a contiguous iterator to a pointer was turned down
by LEWG during the discussion of N3884
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3884.pdf>.  LEWG
would rather have an explicit function.


> Either way, this would also be a useful way to tell if an iterator is
> contiguous, which is something we really need.
>

I know, I know... :-)


As has already been pointed out, if you need a range and have the container
you can express it as [v.data(), v.data()+v.size()).  Random person on the
internet saying that is horrible is usually not a sufficient reason to
change the standard.
--
 Nevin ":-)" Liber  <mailto:nevin@eviloverlord.com>  +1-847-691-1404

--
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAGg_6%2BPq3-JRAK9pNRLmHo8a2XKyLeQ0TFaE3ur3vL_USj8_UQ%40mail.gmail.com.

--94eb2c03148e3489c505571e96e0
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Sat, Aug 19, 2017 at 12:11 PM, Nicol Bolas <span dir=3D=
"ltr">&lt;<a href=3D"mailto:jmckesson@gmail.com" target=3D"_blank">jmckesso=
n@gmail.com</a>&gt;</span> wrote:<br><div class=3D"gmail_extra"><div class=
=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><span clas=
s=3D""><blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8e=
x;border-left:1px #ccc solid;padding-left:1ex">
&gt; On 19 Aug 2017, at 15:51, <a rel=3D"nofollow">eulo...@live.com</a> wro=
te:
<br>&gt;=20
<br>&gt; I think iterators for contiguous containers (std::vector&lt;T&gt;,=
std::array&lt;T&gt;,<wbr>std::basic_string&lt;T&gt;) should all be T*.
<br></blockquote></span><div><br>No. It would be far better to have iterato=
rs from contiguous containers be <i>convertible</i> to pointers. Either thr=
ough implicit conversion both ways or via some explicit interface function.=
<br></div></div></blockquote><div><br></div><div>Using a cast to convert a =
contiguous iterator to a pointer was turned down by LEWG during the discuss=
ion of <a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n=
3884.pdf">N3884</a>.=C2=A0 LEWG would rather have an explicit function.</di=
v><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 =
..8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div>Eit=
her way, this would also be a useful way to tell if an iterator is contiguo=
us, which is something we really need.<br></div></div></blockquote><div><br=
></div><div>I know, I know... :-)</div><div><br></div><div><br></div><div>A=
s has already been pointed out, if you need a range and have the container =
you can express it as [v.data(), v.data()+v.size()).=C2=A0 Random person on=
 the internet saying that is horrible is usually not a sufficient reason to=
 change the standard.<br></div></div>-- <br><div class=3D"gmail_signature" =
data-smartmail=3D"gmail_signature"><div dir=3D"ltr"><div><div dir=3D"ltr"><=
div>=C2=A0Nevin &quot;:-)&quot; Liber=C2=A0 &lt;mailto:<a href=3D"mailto:ne=
vin@eviloverlord.com" target=3D"_blank">nevin@eviloverlord.com</a>&gt; =C2=
=A0+1-847-691-1404</div></div></div></div></div>
</div></div>

<p></p>

-- <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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAGg_6%2BPq3-JRAK9pNRLmHo8a2XKyLeQ0TF=
aE3ur3vL_USj8_UQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAGg_6%2BPq3-JR=
AK9pNRLmHo8a2XKyLeQ0TFaE3ur3vL_USj8_UQ%40mail.gmail.com</a>.<br />

--94eb2c03148e3489c505571e96e0--

.