Topic: Add move constructor and operator [] for std::initializer_list
Author: NDos Dannyu <ndospark320@naver.com>
Date: Sun, 27 Nov 2016 20:18:35 -0800 (PST)
Raw View
------=_Part_560_1163335535.1480306715346
Content-Type: multipart/alternative;
boundary="----=_Part_561_1586331191.1480306715346"
------=_Part_561_1586331191.1480306715346
Content-Type: text/plain; charset=UTF-8
First, most standard containers' *operator =* and *assign *can take
*std::initializer_list* and assign its elements.
But std::initializer_list only has the default constructor, neither copy
constructor nor move constructor.
So, I have to write identical code within their *operator =* and *assign*,
which seems unnecessary.
If std::initializer_list had move constructor, I could implement *operator
=* like this:
*template <class T, class Alloc> **std::deque<T, Alloc> &**std::deque**<T,
Alloc>**::operator = (std::initializer_list<T> ilist) {*
* assign(std::move(ilist));*
* return *this;*
*}*
So, I request to add move constructor for *std::initializer_list*.
Second, because *std::initializer_list* doesn't have *operator []*, I have
to access the initializer list by index like this:
* (an initializer list).begin()[(index)]*
Which seems unnecessary. So, I request to add *operator []* for
*std::initializer_list*.
--
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/8f81c9bc-886d-4484-a966-e9aa0e76414d%40isocpp.org.
------=_Part_561_1586331191.1480306715346
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">=C2=A0First, most standard containers' <b>operator =3D=
</b> and <b>assign </b>can take <b>std::initializer_list</b>=C2=A0and assig=
n its elements.<div>But std::initializer_list only has the default construc=
tor, neither copy constructor nor move constructor.</div><div>So, I have to=
write identical code within their=C2=A0<b>operator =3D</b>=C2=A0and=C2=A0<=
b>assign</b>, which seems unnecessary.</div><div>If std::initializer_list h=
ad move constructor, I could implement <b>operator =3D</b>=C2=A0like this:<=
/div><div><b>template <class T, class Alloc>=C2=A0</b><b>std::deque&l=
t;T, Alloc> &</b><b>std::deque</b><b><T, Alloc></b><b>::operat=
or =3D (std::initializer_list<T> ilist) {</b></div><div><b>=C2=A0 =C2=
=A0 assign(std::move(ilist));</b></div><div><b>=C2=A0 =C2=A0 return *this;<=
/b></div><div><b>}</b></div><div>So, I request to add move constructor for =
<b>std::initializer_list</b>.</div><div>=C2=A0Second, because <b>std::initi=
alizer_list</b> doesn't have <b>operator []</b>, I have to access the i=
nitializer list by index like this:</div><div><b>=C2=A0 =C2=A0 <i>(an initi=
alizer list)</i>.begin()[<i>(index)</i>]</b></div><div>Which seems unnecess=
ary. So, I request to add <b>operator []</b> for <b>std::initializer_list</=
b>.</div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/8f81c9bc-886d-4484-a966-e9aa0e76414d%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/8f81c9bc-886d-4484-a966-e9aa0e76414d=
%40isocpp.org</a>.<br />
------=_Part_561_1586331191.1480306715346--
------=_Part_560_1163335535.1480306715346--
.
Author: Thiago Macieira <thiago@macieira.org>
Date: Sun, 27 Nov 2016 21:38:21 -0800
Raw View
On domingo, 27 de novembro de 2016 20:18:35 PST NDos Dannyu wrote:
> So, I request to add move constructor for *std::initializer_list*.
Can't be done, because std::initializer_list does not own the elements it
points to. Its lifetime cannot be extended.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
--
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/9986470.k7WQfD41n0%40tjmaciei-mobl1.
.
Author: "D. B." <db0451@gmail.com>
Date: Mon, 28 Nov 2016 06:45:18 +0000
Raw View
--001a11443f0ca3dc14054256d0fa
Content-Type: text/plain; charset=UTF-8
Maybe I'm missing it, but why would moving be of any use in that scenario?
Can you explain?
I'm also curious about cases where operator[] would be needed. Every time I
find myself wanting it, I seem to end up improving my design so it's not
necessary or applicable. initializer_list is meant for initialisation, not
as a radom-access sequence.
--
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/CACGiwhFWaQYfVeJmE6bPyK8tL7gR30v7DzZS3bxXQOmjwH9W2w%40mail.gmail.com.
--001a11443f0ca3dc14054256d0fa
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Maybe I'm missing it, but why would moving be of any u=
se in that scenario? Can you explain?<br><div><br>I'm also curious abou=
t cases where operator[] would be needed. Every time I find myself wanting =
it, I seem to end up improving my design so it's not necessary or appli=
cable. initializer_list is meant for initialisation, not as a radom-access =
sequence.<br><br></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/CACGiwhFWaQYfVeJmE6bPyK8tL7gR30v7DzZS=
3bxXQOmjwH9W2w%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhFWaQYfVeJm=
E6bPyK8tL7gR30v7DzZS3bxXQOmjwH9W2w%40mail.gmail.com</a>.<br />
--001a11443f0ca3dc14054256d0fa--
.
Author: "D. B." <db0451@gmail.com>
Date: Mon, 28 Nov 2016 06:56:05 +0000
Raw View
--001a1145b1be35bc05054256f7cf
Content-Type: text/plain; charset=UTF-8
On Mon, Nov 28, 2016 at 6:45 AM, D. B. <db0451@gmail.com> wrote:
> Maybe I'm missing it, but why would moving be of any use in that scenario?
> Can you explain?
>
>
To be clearer, by my understanding, since initializer_list is just a cheap
copy-only view of an array, moving (A) doesn't make sense and (B) would not
make any difference to efficiency anyway. So I see no problem with passing
by value from operator=() to assign(). Does this not work somehow? This
does for me:
#include <initializer_list>
#include <iostream>
void f(std::initializer_list<char> const il)
{
for (auto const it: il) {
std::cout << it << std::endl;
}
}
void g(std::initializer_list<char> const il)
{
f(il);
}
int main()
{
g( {'H', 'E', 'L', 'L', 'O'} );
}
--
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/CACGiwhG46OsLUStSAY9rYaH9ibOrnKUkSvgU6sjtFziRKoT7Zw%40mail.gmail.com.
--001a1145b1be35bc05054256f7cf
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On M=
on, Nov 28, 2016 at 6:45 AM, D. B. <span dir=3D"ltr"><<a target=3D"_blan=
k" href=3D"mailto:db0451@gmail.com">db0451@gmail.com</a>></span> wrote:<=
br><blockquote style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(=
204,204,204);padding-left:1ex" class=3D"gmail_quote"><div dir=3D"ltr">Maybe=
I'm missing it, but why would moving be of any use in that scenario? C=
an you explain?<br><div><br></div></div></blockquote><div><br></div><div>To=
be clearer, by my understanding, since initializer_list is just a cheap co=
py-only view of an array, moving (A) doesn't make sense and (B) would n=
ot make any difference to efficiency anyway. So I see no problem with passi=
ng by value from operator=3D() to assign(). Does this not work somehow? Thi=
s does for me:<br><br><div style=3D"margin-left:40px"><font size=3D"1"><spa=
n style=3D"font-family:monospace,monospace">#include <initializer_list&g=
t;<br>#include <iostream><br><br>void f(std::initializer_list<char=
> const il)<br>{<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 for (auto=
const it: il) {<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 std::cout << it << std::en=
dl;<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 }<br>}<br><br>void g(std:=
:initializer_list<char> const il)<br>{<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 f(il);<br>}<br><br>int main()<br>{<br>=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0 g( {'H', 'E', 'L', 'L'=
;, 'O'} );<br>}<br><br></span></font></div></div><div><font size=3D=
"1"><span style=3D"font-family:monospace,monospace"></span></font></div></d=
iv></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/CACGiwhG46OsLUStSAY9rYaH9ibOrnKUkSvgU=
6sjtFziRKoT7Zw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhG46OsLUStS=
AY9rYaH9ibOrnKUkSvgU6sjtFziRKoT7Zw%40mail.gmail.com</a>.<br />
--001a1145b1be35bc05054256f7cf--
.
Author: NDos Dannyu <ndospark320@naver.com>
Date: Sun, 27 Nov 2016 23:42:07 -0800 (PST)
Raw View
------=_Part_8532_1015109282.1480318927867
Content-Type: multipart/alternative;
boundary="----=_Part_8533_852455056.1480318927868"
------=_Part_8533_852455056.1480318927868
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
2016=EB=85=84 11=EC=9B=94 28=EC=9D=BC =EC=9B=94=EC=9A=94=EC=9D=BC =EC=98=A4=
=ED=9B=84 3=EC=8B=9C 56=EB=B6=84 7=EC=B4=88 UTC+9, D. B. =EB=8B=98=EC=9D=98=
=EB=A7=90:
>
> On Mon, Nov 28, 2016 at 6:45 AM, D. B. <db0...@gmail.com <javascript:>>=
=20
> wrote:
>
>> Maybe I'm missing it, but why would moving be of any use in that=20
>> scenario? Can you explain?
>>
>>
> To be clearer, by my understanding, since initializer_list is just a chea=
p=20
> copy-only view of an array, moving (A) doesn't make sense and (B) would n=
ot=20
> make any difference to efficiency anyway. So I see no problem with passin=
g=20
> by value from operator=3D() to assign(). Does this not work somehow? This=
=20
> does for me:
>
As said, *std::initializer_list* has neither copy constructor nor move=20
constructor. Your code assumes *std::initializer_list* has copy=20
constructor, which it doesn't in the standard.
I used *operator []* like this, in implementation of *std::deque::assign*:
* void assign(std::initializer_list<T> other) {*
* if (other.size() <=3D size()) {*
* std::move(other.begin(), other.end(), begin());*
* erase(cbegin() + other.size(), cend());*
* ce =3D cb + other.size();*
* } else if (other.size() <=3D ce - ab) {*
* std::for_each(ce - other.size(), cb, [&](pointer &p){*
* p =3D vatraits::allocate(va, 1);*
* vatraits::construct(va, p, std::move(other.begin()[&p=
=20
- (ce - other.size())]));*
* });*
* std::move(other.end() - size(), other.end(), begin());*
* cb =3D ce - other.size();*
* } else if (other.size() <=3D ae - ab) {*
* auto newE =3D [&](pointer &p){*
* p =3D vatraits::allocate(va, 1);*
* vatraits::construct(va, p, std::move(other.begin()[&p=
=20
- ab]));*
* };*
* std::for_each(ab, cb, newE);*
* std::move(other.begin() + (cb - ab), other.begin() + (ce -=
=20
ab), begin());*
* std::for_each(ce, ab + other.size(), newE);*
* cb =3D ab;*
* ce =3D ab + other.size();*
* } else {*
* pointer *nab =3D new pointer[other.size() << 1], *ncb =3D =
nab=20
+ (other.size() >> 1);*
* std::for_each(ncb, ncb + size(), [&](pointer &p){*
* p =3D cb[&p - ncb];*
* *p =3D std::move(other.begin()[&p - ncb]);*
* });*
* std::for_each(ncb + size(), ncb + other.size(),=20
[&](pointer &p){*
* p =3D vatraits::allocate(va, 1);*
* vatraits::construct(va, p, std::move(other.begin()[&p=
=20
- ncb]));*
* });*
* cb =3D ncb;*
* ce =3D ncb + other.size();*
* delete []ab;*
* ab =3D nab;*
* ae =3D nab + (size() << 1);*
* }*
* }*
--=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/af83a30d-1b72-4978-8575-7a3bb59456f1%40isocpp.or=
g.
------=_Part_8533_852455056.1480318927868
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br>2016=EB=85=84 11=EC=9B=94 28=EC=9D=BC =EC=9B=94=EC=
=9A=94=EC=9D=BC =EC=98=A4=ED=9B=84 3=EC=8B=9C 56=EB=B6=84 7=EC=B4=88 UTC+9,=
D. B. =EB=8B=98=EC=9D=98 =EB=A7=90:<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"><div><div class=3D"gmail_quote">On Mon, Nov 28, 2016=
at 6:45 AM, D. B. <span dir=3D"ltr"><<a href=3D"javascript:" target=3D"=
_blank" gdf-obfuscated-mailto=3D"3nTAUU7JBAAJ" rel=3D"nofollow" onmousedown=
=3D"this.href=3D'javascript:';return true;" onclick=3D"this.href=3D=
'javascript:';return true;">db0...@gmail.com</a>></span> wrote:<=
br><blockquote style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(=
204,204,204);padding-left:1ex" class=3D"gmail_quote"><div dir=3D"ltr">Maybe=
I'm missing it, but why would moving be of any use in that scenario? C=
an you explain?<br><div><br></div></div></blockquote><div><br></div><div>To=
be clearer, by my understanding, since initializer_list is just a cheap co=
py-only view of an array, moving (A) doesn't make sense and (B) would n=
ot make any difference to efficiency anyway. So I see no problem with passi=
ng by value from operator=3D() to assign(). Does this not work somehow? Thi=
s does for me:</div></div></div></div></blockquote><div>As said, <b>std::in=
itializer_list</b> has neither copy constructor nor move constructor. Your =
code assumes <b>std::initializer_list</b> has copy constructor, which it do=
esn't in the standard.</div><div><br></div><div>I used <b>operator []</=
b> like this, in implementation of <b>std::deque::assign</b>:</div><div><di=
v><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 void assign(std::initializer_list<T>=
other) {</b></div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (ot=
her.size() <=3D size()) {</b></div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 std::move(other.begin(), other.end(), begin());=
</b></div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 e=
rase(cbegin() + other.size(), cend());</b></div><div><b>=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ce =3D cb + other.size();</b></div><=
div><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 } else if (other.size() &l=
t;=3D ce - ab) {</b></div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
=C2=A0 =C2=A0 std::for_each(ce - other.size(), cb, [&](pointer &p)=
{</b></div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 p =3D vatraits::allocate(va, 1);</b></div><div><b>=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 vatraits::const=
ruct(va, p, std::move(other<u>.begin()</u>[&p - (ce - other.size())]));=
</b></div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }=
);</b></div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
std::move(other.end() - size(), other.end(), begin());</b></div><div><b>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cb =3D ce - other.s=
ize();</b></div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 } else if=
(other.size() <=3D ae - ab) {</b></div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 auto newE =3D [&](pointer &p){</b><=
/div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
=C2=A0 p =3D vatraits::allocate(va, 1);</b></div><div><b>=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 vatraits::construct(va=
, p, std::move(other<u>.begin()</u>[&p - ab]));</b></div><div><b>=C2=A0=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 };</b></div><div><b>=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 std::for_each(ab, cb, =
newE);</b></div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 std::move(other.begin() + (cb - ab), other.begin() + (ce - ab), begi=
n());</b></div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 std::for_each(ce, ab + other.size(), newE);</b></div><div><b>=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cb =3D ab;</b></div><div><b>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ce =3D ab + other.s=
ize();</b></div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 } else {<=
/b></div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 po=
inter *nab =3D new pointer[other.size() << 1], *ncb =3D nab + (other.=
size() >> 1);</b></div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 std::for_each(ncb, ncb + size(), [&](pointer &p){=
</b></div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 p =3D cb[&p - ncb];</b></div><div><b>=C2=A0 =C2=A0 =C2=A0=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 *p =3D std::move(other<u>=
..begin()</u>[&p - ncb]);</b></div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 });</b></div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 std::for_each(ncb + size(), ncb + other.siz=
e(), [&](pointer &p){</b></div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 p =3D vatraits::allocate(va, 1);<=
/b></div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 vatraits::construct(va, p, std::move(other<u>.begin()</u>[&am=
p;p - ncb]));</b></div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 });</b></div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 cb =3D ncb;</b></div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ce =3D ncb + other.size();</b></div><div><b>=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 delete []ab;</b></div>=
<div><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ab =3D nab;=
</b></div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 a=
e =3D nab + (size() << 1);</b></div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 }</b></div><div><b>=C2=A0 =C2=A0 =C2=A0 =C2=A0 }</b></div=
></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/af83a30d-1b72-4978-8575-7a3bb59456f1%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/af83a30d-1b72-4978-8575-7a3bb59456f1=
%40isocpp.org</a>.<br />
------=_Part_8533_852455056.1480318927868--
------=_Part_8532_1015109282.1480318927867--
.
Author: "D. B." <db0451@gmail.com>
Date: Mon, 28 Nov 2016 08:09:04 +0000
Raw View
--001a1130cf063b5d0d054257fca6
Content-Type: text/plain; charset=UTF-8
I'm pretty sure passing initializer_list by value is defined,
but even if not, just pass it by reference then.
It still doesn't need to be movable in any case.
--
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/CACGiwhH5Ukbzo-dFQ2yEp%3DfsPa7VwDq6HEJaf_V_VDjYJj287w%40mail.gmail.com.
--001a1130cf063b5d0d054257fca6
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>I'm pretty sure passing initializer_list by value=
is defined,<br></div>but even if not, just pass it by reference then.<br>I=
t still doesn't need to be movable in any case.<br></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/CACGiwhH5Ukbzo-dFQ2yEp%3DfsPa7VwDq6HE=
Jaf_V_VDjYJj287w%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhH5Ukbzo-=
dFQ2yEp%3DfsPa7VwDq6HEJaf_V_VDjYJj287w%40mail.gmail.com</a>.<br />
--001a1130cf063b5d0d054257fca6--
.
Author: "D. B." <db0451@gmail.com>
Date: Mon, 28 Nov 2016 08:10:53 +0000
Raw View
--001a11c39b22c1a33a054258022d
Content-Type: text/plain; charset=UTF-8
I mean, you said initializer_list has no copy constructor, but it should
have a *default* copy constructor, which simply copies the contained
begin/end pointers (or begin + size, doesn't matter). Likewise move should
do the same thing, unless it's =deleted. Not that it matters, again.
--
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/CACGiwhGfYyaQxG%2BKPayee%2BQdv9ZzXdrRNwvu7uf%3Dt-Sw9nQ76w%40mail.gmail.com.
--001a11c39b22c1a33a054258022d
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">I mean, you said initializer_list has no copy constructor,=
but it should have a <b>default</b> copy constructor, which simply copies =
the contained begin/end pointers (or begin + size, doesn't matter). Lik=
ewise move should do the same thing, unless it's =3Ddeleted. Not that i=
t matters, again.<br></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/CACGiwhGfYyaQxG%2BKPayee%2BQdv9ZzXdrR=
Nwvu7uf%3Dt-Sw9nQ76w%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoote=
r">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhGfYy=
aQxG%2BKPayee%2BQdv9ZzXdrRNwvu7uf%3Dt-Sw9nQ76w%40mail.gmail.com</a>.<br />
--001a11c39b22c1a33a054258022d--
.
Author: NDos Dannyu <ndospark320@naver.com>
Date: Mon, 28 Nov 2016 00:24:53 -0800 (PST)
Raw View
------=_Part_10252_1618073059.1480321493820
Content-Type: multipart/alternative;
boundary="----=_Part_10253_1631832797.1480321493820"
------=_Part_10253_1631832797.1480321493820
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
2016=EB=85=84 11=EC=9B=94 28=EC=9D=BC =EC=9B=94=EC=9A=94=EC=9D=BC =EC=98=A4=
=ED=9B=84 5=EC=8B=9C 10=EB=B6=84 56=EC=B4=88 UTC+9, D. B. =EB=8B=98=EC=9D=
=98 =EB=A7=90:
>
> I mean, you said initializer_list has no copy constructor, but it should=
=20
> have a *default* copy constructor, which simply copies the contained=20
> begin/end pointers (or begin + size, doesn't matter). Likewise move shoul=
d=20
> do the same thing, unless it's =3Ddeleted. Not that it matters, again.
>
Oh, it implicitly does, as well as the move constructor. I didn't exactly=
=20
know when the special member functions are implicitly defined, sorry.
Then, what about *operator []*?
--=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/37189b13-4b8b-4e6b-846c-a4f4f3a5a37f%40isocpp.or=
g.
------=_Part_10253_1631832797.1480321493820
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br>2016=EB=85=84 11=EC=9B=94 28=EC=9D=BC =EC=9B=94=EC=
=9A=94=EC=9D=BC =EC=98=A4=ED=9B=84 5=EC=8B=9C 10=EB=B6=84 56=EC=B4=88 UTC+9=
, D. B. =EB=8B=98=EC=9D=98 =EB=A7=90:<blockquote class=3D"gmail_quote" styl=
e=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left:=
1ex;"><div dir=3D"ltr">I mean, you said initializer_list has no copy const=
ructor, but it should have a <b>default</b> copy constructor, which simply =
copies the contained begin/end pointers (or begin + size, doesn't matte=
r). Likewise move should do the same thing, unless it's =3Ddeleted. Not=
that it matters, again.<br></div></blockquote><div><br></div><div>Oh, it i=
mplicitly does, as well as the move constructor. I didn't exactly know =
when the special member functions are implicitly defined, sorry.</div><div>=
Then, what about <b>operator []</b>?</div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/37189b13-4b8b-4e6b-846c-a4f4f3a5a37f%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/37189b13-4b8b-4e6b-846c-a4f4f3a5a37f=
%40isocpp.org</a>.<br />
------=_Part_10253_1631832797.1480321493820--
------=_Part_10252_1618073059.1480321493820--
.
Author: "D. B." <db0451@gmail.com>
Date: Mon, 28 Nov 2016 08:30:00 +0000
Raw View
--001a114312ec19c87905425847d2
Content-Type: text/plain; charset=UTF-8
operator[] is never implicitly defined. As for your example about where it
would be useful, I'd need to take some time to comprehend that. :D
--
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/CACGiwhFcA0Zbdw_XvpbnOu0uEi%3DRWw3UrqtFUCAV40h3W3ygRw%40mail.gmail.com.
--001a114312ec19c87905425847d2
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>operator[] is never implicitly defined. As for your e=
xample about where it would be useful, I'd need to take some time to co=
mprehend that. :D<br></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/CACGiwhFcA0Zbdw_XvpbnOu0uEi%3DRWw3Urq=
tFUCAV40h3W3ygRw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhFcA0Zbdw=
_XvpbnOu0uEi%3DRWw3UrqtFUCAV40h3W3ygRw%40mail.gmail.com</a>.<br />
--001a114312ec19c87905425847d2--
.
Author: NDos Dannyu <ndospark320@naver.com>
Date: Mon, 28 Nov 2016 00:36:16 -0800 (PST)
Raw View
------=_Part_2455_338650910.1480322176964
Content-Type: multipart/alternative;
boundary="----=_Part_2456_628912075.1480322176964"
------=_Part_2456_628912075.1480322176964
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
2016=EB=85=84 11=EC=9B=94 28=EC=9D=BC =EC=9B=94=EC=9A=94=EC=9D=BC =EC=98=A4=
=ED=9B=84 5=EC=8B=9C 30=EB=B6=84 2=EC=B4=88 UTC+9, D. B. =EB=8B=98=EC=9D=98=
=EB=A7=90:
>
> operator[] is never implicitly defined. As for your example about where i=
t=20
> would be useful, I'd need to take some time to comprehend that. :D
>
I asked whether it is needed, though.
Here is the entire code:
=20
http://codereview.stackexchange.com/questions/148303/implementation-of-stdd=
eque
--=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/1615daba-b149-42de-b89d-c5ee5d3260b4%40isocpp.or=
g.
------=_Part_2456_628912075.1480322176964
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br>2016=EB=85=84 11=EC=9B=94 28=EC=9D=BC =EC=9B=94=EC=
=9A=94=EC=9D=BC =EC=98=A4=ED=9B=84 5=EC=8B=9C 30=EB=B6=84 2=EC=B4=88 UTC+9,=
D. B. =EB=8B=98=EC=9D=98 =EB=A7=90:<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"><div>operator[] is never implicitly defined. As for =
your example about where it would be useful, I'd need to take some time=
to comprehend that. :D<br></div></div></blockquote><div>=C2=A0I asked whet=
her it is needed, though.</div><div><br></div><div>Here is the entire code:=
</div><div>=C2=A0<a href=3D"http://codereview.stackexchange.com/questions/1=
48303/implementation-of-stddeque">http://codereview.stackexchange.com/quest=
ions/148303/implementation-of-stddeque</a></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/1615daba-b149-42de-b89d-c5ee5d3260b4%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/1615daba-b149-42de-b89d-c5ee5d3260b4=
%40isocpp.org</a>.<br />
------=_Part_2456_628912075.1480322176964--
------=_Part_2455_338650910.1480322176964--
.
Author: ricky.65@hotmail.com
Date: Mon, 5 Dec 2016 14:53:53 -0800 (PST)
Raw View
------=_Part_1981_1357055117.1480978433912
Content-Type: multipart/alternative;
boundary="----=_Part_1982_1909973480.1480978433912"
------=_Part_1982_1909973480.1480978433912
Content-Type: text/plain; charset=UTF-8
As welll as missing operator [], std::initializer_list also lacks the
relational operators. I think they should be added also.
--
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/a88b0c95-5cc9-4385-ba9e-901d24fcc650%40isocpp.org.
------=_Part_1982_1909973480.1480978433912
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">As welll as missing operator [], std::initializer_list als=
o lacks the relational operators. I think they should be added also.</div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/a88b0c95-5cc9-4385-ba9e-901d24fcc650%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/a88b0c95-5cc9-4385-ba9e-901d24fcc650=
%40isocpp.org</a>.<br />
------=_Part_1982_1909973480.1480978433912--
------=_Part_1981_1357055117.1480978433912--
.
Author: Daniel Boles <db0451@gmail.com>
Date: Mon, 05 Dec 2016 23:01:32 +0000
Raw View
Can you provide a convincing use case for relational operators on
std::initializer_list? operator[] kinda makes sense at a push, but I'm
not sure about anything more elaborate.
--
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/1480978892.2164.0.camel%40gmail.com.
.
Author: Richard Smith <richard@metafoo.co.uk>
Date: Mon, 5 Dec 2016 15:14:53 -0800
Raw View
--94eb2c123a08c510810542f1754a
Content-Type: text/plain; charset=UTF-8
On 5 December 2016 at 14:53, <ricky.65@hotmail.com> wrote:
> As welll as missing operator [], std::initializer_list also lacks the
> relational operators. I think they should be added also.
>
Why? initializer_list is just a vehicle for shipping a homogeneous
initializer's value into your constructor. It is not a container.
--
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/CAOfiQqmHt02sPaMcU-ndo083kJ_ghK3JaZC%2B0k6OTfsBexcTJA%40mail.gmail.com.
--94eb2c123a08c510810542f1754a
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 5=
December 2016 at 14:53, <span dir=3D"ltr"><<a href=3D"mailto:ricky.65@=
hotmail.com" target=3D"_blank">ricky.65@hotmail.com</a>></span> wrote:<b=
r><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:=
1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">As welll as missing opera=
tor [], std::initializer_list also lacks the relational operators. I think =
they should be added also.</div></blockquote><div><br></div><div>Why? initi=
alizer_list is just a vehicle for shipping a homogeneous initializer's =
value into your constructor. It is not a container.</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" 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/CAOfiQqmHt02sPaMcU-ndo083kJ_ghK3JaZC%=
2B0k6OTfsBexcTJA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOfiQqmHt02sPa=
McU-ndo083kJ_ghK3JaZC%2B0k6OTfsBexcTJA%40mail.gmail.com</a>.<br />
--94eb2c123a08c510810542f1754a--
.
Author: Thiago Macieira <thiago@macieira.org>
Date: Mon, 05 Dec 2016 15:53:29 -0800
Raw View
Em segunda-feira, 5 de dezembro de 2016, =C3=A0s 14:53:53 PST, ricky.65@hot=
mail.com=20
escreveu:
> As welll as missing operator [], std::initializer_list also lacks the
> relational operators. I think they should be added also.
operator[] is unnecessary, since you can do begin()[n].
Why should it have relational operators? What if the type it's initialising=
=20
has no concept of ordering?
--=20
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
--=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/2015025.qjk2gsA4gC%40tjmaciei-mobl1.
.