Topic: Range-based for: emplace construction of the
Author: =?UTF-8?Q?Micha=C5=82_Dominiak?= <griwes@griwes.info>
Date: Thu, 01 Mar 2018 14:02:55 +0000
Raw View
--f403045dceb6a2977305665a5178
Content-Type: text/plain; charset="UTF-8"
Please explain where do you see assignment in the range for loop semantics?
Because that's not what the standard says.
http://eel.is/c++draft/stmt.ranged:
The range-based for statement
for ( *init-statement
<http://eel.is/c++draft/stmt.stmt#nt:init-statement>*opt
*for-range-declaration
<http://eel.is/c++draft/stmt.iter#nt:for-range-declaration>* :
*for-range-initializer
<http://eel.is/c++draft/stmt.iter#nt:for-range-initializer>* )
*statement <http://eel.is/c++draft/stmt.stmt#nt:statement>*
is equivalent to
{
*init-statement <http://eel.is/c++draft/stmt.stmt#nt:init-statement>*opt
auto &&__range = *for-range-initializer
<http://eel.is/c++draft/stmt.iter#nt:for-range-initializer>* ;
auto __begin = begin-expr ;
auto __end = end-expr ;
for ( ; __begin != __end; ++__begin ) {
*for-range-declaration
<http://eel.is/c++draft/stmt.iter#nt:for-range-declaration>* =
*__begin;
*statement <http://eel.is/c++draft/stmt.stmt#nt:statement>*
}}
And this: https://godbolt.org/g/yUWr6x just works (which is obvious when
you actually read the specs).
On Thu, Mar 1, 2018 at 2:55 PM John Yates <john@yates-sheets.org> wrote:
> Recently I have written a class to be used as the range expression in
> range-based for loops. Buried 4 levels within my new class is a tiny leaf
> object with RAII semantics. I have been happily using that object
> unchanged for years.
>
> Now my new range class is causing me to have to add move semantics not
> only to that tiny leaf class but also the 3 new classes layered above it.
> As best as I can tell this is triggered by the fact that throughout the
> evolution of range-base for the expansion has always included
> initialization the hidden range variable via assignment. If the
> range-expression is an invocation of a constructor then is there any reason
> that the language could not mandate emplace construction?
>
> /john
>
> --
> 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/CAJnXXogM%3DQ_OUA2806gwbNtPiQ9f2G8KD49VOXteKB7UWKxUrw%40mail.gmail.com
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAJnXXogM%3DQ_OUA2806gwbNtPiQ9f2G8KD49VOXteKB7UWKxUrw%40mail.gmail.com?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/CAPCFJdRkrMvhsqA8SdakDZy4xqkRm%3DY9jjG-JJ1MDMFjrCMoPw%40mail.gmail.com.
--f403045dceb6a2977305665a5178
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Please explain where do you see assignment in the range fo=
r loop semantics? Because that's not what the standard says.<div><br></=
div><div><div><a href=3D"http://eel.is/c++draft/stmt.ranged">http://eel.is/=
c++draft/stmt.ranged</a>:<br></div></div><div><br></div><div><span style=3D=
"font-family:serif;font-size:medium;text-align:justify">The range-based=C2=
=A0</span><span class=3D"inbox-inbox-texttt" style=3D"font-family:monospace=
;text-align:justify">for</span><span style=3D"font-family:serif;font-size:m=
edium;text-align:justify">=C2=A0statement</span><pre class=3D"inbox-inbox-n=
cbnf" style=3D"font-family:serif;margin-top:0.5em;margin-bottom:0.5em;margi=
n-left:40pt;font-size:medium;text-align:justify"><span class=3D"inbox-inbox=
-terminal" style=3D"font-family:monospace">for (</span> <i><a href=3D"http:=
//eel.is/c++draft/stmt.stmt#nt:init-statement" style=3D"text-decoration-lin=
e:none">init-statement</a></i><span class=3D"inbox-inbox-mjx-chtml" style=
=3D"display:inline-block;line-height:0;text-align:left;font-size:16px;word-=
wrap:normal;word-spacing:normal;white-space:nowrap;float:none;direction:ltr=
;max-width:none;max-height:none;min-width:0px;min-height:0px;border:0px;mar=
gin:0px;padding:1px 0px"><span class=3D"inbox-inbox-mjx-math" style=3D"disp=
lay:inline-block;border-collapse:separate"><span class=3D"inbox-inbox-mjx-m=
row" style=3D"display:inline-block;box-sizing:content-box"><span class=3D"i=
nbox-inbox-mjx-msubsup" style=3D"display:inline-block;box-sizing:content-bo=
x"><span class=3D"inbox-inbox-mjx-base" style=3D"display:inline-block;box-s=
izing:content-box"><span class=3D"inbox-inbox-mjx-mi" style=3D"display:inli=
ne-block;box-sizing:content-box"><span class=3D"inbox-inbox-mjx-char" style=
=3D"display:block;white-space:pre;box-sizing:content-box"></span></span></s=
pan><span class=3D"inbox-inbox-mjx-sub" style=3D"display:inline-block;font-=
size:11.312px;vertical-align:-0.212em;padding-right:0.071em;box-sizing:cont=
ent-box"><span class=3D"inbox-inbox-mjx-texatom" style=3D"display:inline-bl=
ock;box-sizing:content-box"><span class=3D"inbox-inbox-mjx-mrow" style=3D"d=
isplay:inline-block;box-sizing:content-box"><span class=3D"inbox-inbox-mjx-=
mi" style=3D"display:inline-block;box-sizing:content-box"><span class=3D"in=
box-inbox-mjx-char inbox-inbox-MJXc-TeX-main-I" style=3D"display:block;whit=
e-space:pre;font-style:italic;padding-top:0.225em;padding-bottom:0.298em;bo=
x-sizing:content-box">o</span></span><span class=3D"inbox-inbox-mjx-mi" sty=
le=3D"display:inline-block;box-sizing:content-box"><span class=3D"inbox-inb=
ox-mjx-char inbox-inbox-MJXc-TeX-main-I" style=3D"display:block;white-space=
:pre;font-style:italic;padding-top:0.225em;padding-bottom:0.446em;box-sizin=
g:content-box">p</span></span><span class=3D"inbox-inbox-mjx-mi" style=3D"d=
isplay:inline-block;box-sizing:content-box"><span class=3D"inbox-inbox-mjx-=
char inbox-inbox-MJXc-TeX-main-I" style=3D"display:block;white-space:pre;fo=
nt-style:italic;padding-top:0.372em;padding-bottom:0.298em;box-sizing:conte=
nt-box">t</span></span></span></span></span></span></span></span></span> <i=
><a href=3D"http://eel.is/c++draft/stmt.iter#nt:for-range-declaration" styl=
e=3D"text-decoration-line:none">for-range-declaration</a></i> <span class=
=3D"inbox-inbox-terminal" style=3D"font-family:monospace">:</span> <i><a hr=
ef=3D"http://eel.is/c++draft/stmt.iter#nt:for-range-initializer" style=3D"t=
ext-decoration-line:none">for-range-initializer</a></i> <span class=3D"inbo=
x-inbox-terminal" style=3D"font-family:monospace">)</span> <i><a href=3D"ht=
tp://eel.is/c++draft/stmt.stmt#nt:statement" style=3D"text-decoration-line:=
none">statement</a></i>
</pre><span style=3D"font-family:serif;font-size:medium;text-align:justify"=
>is equivalent to</span><pre class=3D"inbox-inbox-ncbnftab" style=3D"font-f=
amily:serif;font-style:italic;margin-top:0.5em;margin-bottom:0.5em;margin-l=
eft:40pt;font-size:medium;text-align:justify"><span class=3D"inbox-inbox-te=
rminal" style=3D"font-family:monospace;font-style:normal">{</span>
<i><a href=3D"http://eel.is/c++draft/stmt.stmt#nt:init-statement" style=3D=
"text-decoration-line:none">init-statement</a></i><span class=3D"inbox-inbo=
x-mjx-chtml" style=3D"display:inline-block;line-height:0;text-align:left;fo=
nt-style:normal;font-size:16px;word-wrap:normal;word-spacing:normal;white-s=
pace:nowrap;float:none;direction:ltr;max-width:none;max-height:none;min-wid=
th:0px;min-height:0px;border:0px;margin:0px;padding:1px 0px"><span class=3D=
"inbox-inbox-mjx-math" style=3D"display:inline-block;border-collapse:separa=
te"><span class=3D"inbox-inbox-mjx-mrow" style=3D"display:inline-block;box-=
sizing:content-box"><span class=3D"inbox-inbox-mjx-msubsup" style=3D"displa=
y:inline-block;box-sizing:content-box"><span class=3D"inbox-inbox-mjx-base"=
style=3D"display:inline-block;box-sizing:content-box"><span class=3D"inbox=
-inbox-mjx-mi" style=3D"display:inline-block;box-sizing:content-box"><span =
class=3D"inbox-inbox-mjx-char" style=3D"display:block;white-space:pre;box-s=
izing:content-box"></span></span></span><span class=3D"inbox-inbox-mjx-sub"=
style=3D"display:inline-block;font-size:11.312px;vertical-align:-0.212em;p=
adding-right:0.071em;box-sizing:content-box"><span class=3D"inbox-inbox-mjx=
-texatom" style=3D"display:inline-block;box-sizing:content-box"><span class=
=3D"inbox-inbox-mjx-mrow" style=3D"display:inline-block;box-sizing:content-=
box"><span class=3D"inbox-inbox-mjx-mi" style=3D"display:inline-block;box-s=
izing:content-box"><span class=3D"inbox-inbox-mjx-char inbox-inbox-MJXc-TeX=
-main-I" style=3D"display:block;white-space:pre;font-style:italic;padding-t=
op:0.225em;padding-bottom:0.298em;box-sizing:content-box">o</span></span><s=
pan class=3D"inbox-inbox-mjx-mi" style=3D"display:inline-block;box-sizing:c=
ontent-box"><span class=3D"inbox-inbox-mjx-char inbox-inbox-MJXc-TeX-main-I=
" style=3D"display:block;white-space:pre;font-style:italic;padding-top:0.22=
5em;padding-bottom:0.446em;box-sizing:content-box">p</span></span><span cla=
ss=3D"inbox-inbox-mjx-mi" style=3D"display:inline-block;box-sizing:content-=
box"><span class=3D"inbox-inbox-mjx-char inbox-inbox-MJXc-TeX-main-I" style=
=3D"display:block;white-space:pre;font-style:italic;padding-top:0.372em;pad=
ding-bottom:0.298em;box-sizing:content-box">t</span></span></span></span></=
span></span></span></span></span>
<span class=3D"inbox-inbox-terminal" style=3D"font-family:monospace;font-s=
tyle:normal">auto &&__range =3D</span> <i><a href=3D"http://eel.is/=
c++draft/stmt.iter#nt:for-range-initializer" style=3D"text-decoration-line:=
none">for-range-initializer</a></i> <span class=3D"inbox-inbox-terminal" st=
yle=3D"font-family:monospace;font-style:normal">;</span>
<span class=3D"inbox-inbox-terminal" style=3D"font-family:monospace;font-s=
tyle:normal">auto __begin =3D</span> begin-expr <span class=3D"inbox-inbox-=
terminal" style=3D"font-family:monospace;font-style:normal">;</span>
<span class=3D"inbox-inbox-terminal" style=3D"font-family:monospace;font-s=
tyle:normal">auto __end =3D</span> end-expr <span class=3D"inbox-inbox-term=
inal" style=3D"font-family:monospace;font-style:normal">;</span>
<span class=3D"inbox-inbox-terminal" style=3D"font-family:monospace;font-s=
tyle:normal">for ( ; __begin !=3D __end; ++__begin ) {</span>
<i><a href=3D"http://eel.is/c++draft/stmt.iter#nt:for-range-declaration" =
style=3D"text-decoration-line:none">for-range-declaration</a></i> <span cla=
ss=3D"inbox-inbox-terminal" style=3D"font-family:monospace;font-style:norma=
l">=3D *__begin;</span>
<i><a href=3D"http://eel.is/c++draft/stmt.stmt#nt:statement" style=3D"tex=
t-decoration-line:none">statement</a></i>
<span class=3D"inbox-inbox-terminal" style=3D"font-family:monospace;font-s=
tyle:normal">}</span>
<span class=3D"inbox-inbox-terminal" style=3D"font-family:monospace;font-st=
yle:normal">}</span>
</pre><span style=3D"font-family:serif;font-size:medium;text-align:justify"=
></span>And this:=C2=A0<a href=3D"https://godbolt.org/g/yUWr6x">https://god=
bolt.org/g/yUWr6x</a>=C2=A0just works (which is obvious when you actually r=
ead the specs).</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr">=
On Thu, Mar 1, 2018 at 2:55 PM John Yates <<a href=3D"mailto:john@yates-=
sheets.org">john@yates-sheets.org</a>> wrote:<br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-f=
amily:arial,helvetica,sans-serif">Recently I have written a class to be use=
d as the range expression in range-based for loops.=C2=A0 Buried 4 levels w=
ithin my new class is a tiny leaf object with RAII semantics.=C2=A0 I have =
been happily using that object unchanged for years.</div><div class=3D"gmai=
l_default" style=3D"font-family:arial,helvetica,sans-serif"><br></div><div =
class=3D"gmail_default" style=3D"font-family:arial,helvetica,sans-serif">No=
w my new range class is causing me to have to add move semantics not only t=
o that tiny leaf class but also the 3 new classes layered above it.=C2=A0 A=
s best as I can tell this is triggered by the fact that throughout the evol=
ution of range-base for the expansion has always included initialization th=
e hidden range variable via assignment.=C2=A0 If the range-expression is an=
invocation of a constructor then is there any reason that the language cou=
ld not mandate emplace construction?</div><div class=3D"gmail_default" styl=
e=3D"font-family:arial,helvetica,sans-serif"><br></div><div class=3D"gmail_=
default" style=3D"font-family:arial,helvetica,sans-serif">/john</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" 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/CAJnXXogM%3DQ_OUA2806gwbNtPiQ9f2G8KD4=
9VOXteKB7UWKxUrw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoote=
r" target=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-pro=
posals/CAJnXXogM%3DQ_OUA2806gwbNtPiQ9f2G8KD49VOXteKB7UWKxUrw%40mail.gmail.c=
om</a>.<br>
</blockquote></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/CAPCFJdRkrMvhsqA8SdakDZy4xqkRm%3DY9jj=
G-JJ1MDMFjrCMoPw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAPCFJdRkrMvhsq=
A8SdakDZy4xqkRm%3DY9jjG-JJ1MDMFjrCMoPw%40mail.gmail.com</a>.<br />
--f403045dceb6a2977305665a5178--
.
Author: John Yates <john@yates-sheets.org>
Date: Thu, 1 Mar 2018 09:13:56 -0500
Raw View
--94eb2c0cf7b4663aaa05665a789f
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On Thu, Mar 1, 2018 at 9:02 AM, Micha=C5=82 Dominiak <griwes@griwes.info> w=
rote:
> Please explain where do you see assignment in the range for loop
> semantics? Because that's not what the standard says.
>
> http://eel.is/c++draft/stmt.ranged:
>
> The range-based for statement
>
> for ( *init-statement <http://eel.is/c++draft/stmt.stmt#nt:init-statement=
>*opt *for-range-declaration <http://eel.is/c++draft/stmt.iter#nt:for-range=
-declaration>* : *for-range-initializer <http://eel.is/c++draft/stmt.iter#n=
t:for-range-initializer>* ) *statement <http://eel.is/c++draft/stmt.stmt#nt=
:statement>*
>
> is equivalent to
>
> {
> *init-statement <http://eel.is/c++draft/stmt.stmt#nt:init-statement>*opt
> auto &&__range =3D *for-range-initializer <http://eel.is/c++draft/stmt.i=
ter#nt:for-range-initializer>* ;
> =E2=80=8B << is this not an assignment?=E2=80=8B
>
> auto __begin =3D begin-expr ;
> auto __end =3D end-expr ;
> for ( ; __begin !=3D __end; ++__begin ) {
> *for-range-declaration <http://eel.is/c++draft/stmt.iter#nt:for-range-d=
eclaration>* =3D *__begin;
> *statement <http://eel.is/c++draft/stmt.stmt#nt:statement>*
> }}
>
> And this: https://godbolt.org/g/yUWr6x just works (which is obvious when
> you actually read the specs).
>
=E2=80=8BYour class has no non-trivial destruction semantics.
--=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/CAJnXXojRPQKWaLcyiGCKxDbfhO31VCMzoXE2aDcRknOM4Fv=
TUA%40mail.gmail.com.
--94eb2c0cf7b4663aaa05665a789f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:arial,he=
lvetica,sans-serif"><span style=3D"font-family:arial,sans-serif">On Thu, Ma=
r 1, 2018 at 9:02 AM, Micha=C5=82 Dominiak </span><span dir=3D"ltr" style=
=3D"font-family:arial,sans-serif"><<a href=3D"mailto:griwes@griwes.info"=
target=3D"_blank">griwes@griwes.info</a>></span><span style=3D"font-fam=
ily:arial,sans-serif"> wrote:</span><br></div><div class=3D"gmail_extra"><d=
iv class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:=
0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">Pl=
ease explain where do you see assignment in the range for loop semantics? B=
ecause that's not what the standard says.<div><br></div><div><div><a hr=
ef=3D"http://eel.is/c++draft/stmt.ranged" target=3D"_blank">http://eel.is/c=
++draft/stmt.<wbr>ranged</a>:<br></div></div><div><br></div><div><span styl=
e=3D"font-family:serif;font-size:medium;text-align:justify">The range-based=
=C2=A0</span><span class=3D"m_-1258501719364589994inbox-inbox-texttt" style=
=3D"font-family:monospace;text-align:justify">for</span><span style=3D"font=
-family:serif;font-size:medium;text-align:justify">=C2=A0statement</span><p=
re class=3D"m_-1258501719364589994inbox-inbox-ncbnf" style=3D"font-family:s=
erif;margin-top:0.5em;margin-bottom:0.5em;margin-left:40pt;font-size:medium=
;text-align:justify"><span class=3D"m_-1258501719364589994inbox-inbox-termi=
nal" style=3D"font-family:monospace">for (</span> <i><a href=3D"http://eel.=
is/c++draft/stmt.stmt#nt:init-statement" style=3D"text-decoration-line:none=
" target=3D"_blank">init-statement</a></i><span class=3D"m_-125850171936458=
9994inbox-inbox-mjx-chtml" style=3D"display:inline-block;line-height:0;text=
-align:left;font-size:16px;word-wrap:normal;word-spacing:normal;white-space=
:nowrap;float:none;direction:ltr;max-width:none;max-height:none;min-width:0=
px;min-height:0px;border:0px;margin:0px;padding:1px 0px"><span class=3D"m_-=
1258501719364589994inbox-inbox-mjx-math" style=3D"display:inline-block;bord=
er-collapse:separate"><span class=3D"m_-1258501719364589994inbox-inbox-mjx-=
mrow" style=3D"display:inline-block;box-sizing:content-box"><span class=3D"=
m_-1258501719364589994inbox-inbox-mjx-msubsup" style=3D"display:inline-bloc=
k;box-sizing:content-box"><span class=3D"m_-1258501719364589994inbox-inbox-=
mjx-base" style=3D"display:inline-block;box-sizing:content-box"><span class=
=3D"m_-1258501719364589994inbox-inbox-mjx-mi" style=3D"display:inline-block=
;box-sizing:content-box"><span class=3D"m_-1258501719364589994inbox-inbox-m=
jx-char" style=3D"display:block;white-space:pre-wrap;box-sizing:content-box=
"></span></span></span><span class=3D"m_-1258501719364589994inbox-inbox-mjx=
-sub" style=3D"display:inline-block;font-size:11.312px;vertical-align:-0.21=
2em;padding-right:0.071em;box-sizing:content-box"><span class=3D"m_-1258501=
719364589994inbox-inbox-mjx-texatom" style=3D"display:inline-block;box-sizi=
ng:content-box"><span class=3D"m_-1258501719364589994inbox-inbox-mjx-mrow" =
style=3D"display:inline-block;box-sizing:content-box"><span class=3D"m_-125=
8501719364589994inbox-inbox-mjx-mi" style=3D"display:inline-block;box-sizin=
g:content-box"><span class=3D"m_-1258501719364589994inbox-inbox-mjx-char m_=
-1258501719364589994inbox-inbox-MJXc-TeX-main-I" style=3D"display:block;whi=
te-space:pre-wrap;font-style:italic;padding-top:0.225em;padding-bottom:0.29=
8em;box-sizing:content-box">o</span></span><span class=3D"m_-12585017193645=
89994inbox-inbox-mjx-mi" style=3D"display:inline-block;box-sizing:content-b=
ox"><span class=3D"m_-1258501719364589994inbox-inbox-mjx-char m_-1258501719=
364589994inbox-inbox-MJXc-TeX-main-I" style=3D"display:block;white-space:pr=
e-wrap;font-style:italic;padding-top:0.225em;padding-bottom:0.446em;box-siz=
ing:content-box">p</span></span><span class=3D"m_-1258501719364589994inbox-=
inbox-mjx-mi" style=3D"display:inline-block;box-sizing:content-box"><span c=
lass=3D"m_-1258501719364589994inbox-inbox-mjx-char m_-1258501719364589994in=
box-inbox-MJXc-TeX-main-I" style=3D"display:block;white-space:pre-wrap;font=
-style:italic;padding-top:0.372em;padding-bottom:0.298em;box-sizing:content=
-box">t</span></span></span></span></span></span></span></span></span> <i><=
a href=3D"http://eel.is/c++draft/stmt.iter#nt:for-range-declaration" style=
=3D"text-decoration-line:none" target=3D"_blank">for-range-declaration</a><=
/i> <span class=3D"m_-1258501719364589994inbox-inbox-terminal" style=3D"fon=
t-family:monospace">:</span> <i><a href=3D"http://eel.is/c++draft/stmt.iter=
#nt:for-range-initializer" style=3D"text-decoration-line:none" target=3D"_b=
lank">for-range-initializer</a></i> <span class=3D"m_-1258501719364589994in=
box-inbox-terminal" style=3D"font-family:monospace">)</span> <i><a href=3D"=
http://eel.is/c++draft/stmt.stmt#nt:statement" style=3D"text-decoration-lin=
e:none" target=3D"_blank">statement</a></i>
</pre><span style=3D"font-family:serif;font-size:medium;text-align:justify"=
>is equivalent to</span><pre class=3D"m_-1258501719364589994inbox-inbox-ncb=
nftab" style=3D"font-family:serif;font-style:italic;margin-top:0.5em;margin=
-bottom:0.5em;margin-left:40pt;font-size:medium;text-align:justify"><span c=
lass=3D"m_-1258501719364589994inbox-inbox-terminal" style=3D"font-family:mo=
nospace;font-style:normal">{</span>
<i><a href=3D"http://eel.is/c++draft/stmt.stmt#nt:init-statement" style=3D=
"text-decoration-line:none" target=3D"_blank">init-statement</a></i><span c=
lass=3D"m_-1258501719364589994inbox-inbox-mjx-chtml" style=3D"display:inlin=
e-block;line-height:0;text-align:left;font-style:normal;font-size:16px;word=
-wrap:normal;word-spacing:normal;white-space:nowrap;float:none;direction:lt=
r;max-width:none;max-height:none;min-width:0px;min-height:0px;border:0px;ma=
rgin:0px;padding:1px 0px"><span class=3D"m_-1258501719364589994inbox-inbox-=
mjx-math" style=3D"display:inline-block;border-collapse:separate"><span cla=
ss=3D"m_-1258501719364589994inbox-inbox-mjx-mrow" style=3D"display:inline-b=
lock;box-sizing:content-box"><span class=3D"m_-1258501719364589994inbox-inb=
ox-mjx-msubsup" style=3D"display:inline-block;box-sizing:content-box"><span=
class=3D"m_-1258501719364589994inbox-inbox-mjx-base" style=3D"display:inli=
ne-block;box-sizing:content-box"><span class=3D"m_-1258501719364589994inbox=
-inbox-mjx-mi" style=3D"display:inline-block;box-sizing:content-box"><span =
class=3D"m_-1258501719364589994inbox-inbox-mjx-char" style=3D"display:block=
;white-space:pre-wrap;box-sizing:content-box"></span></span></span><span cl=
ass=3D"m_-1258501719364589994inbox-inbox-mjx-sub" style=3D"display:inline-b=
lock;font-size:11.312px;vertical-align:-0.212em;padding-right:0.071em;box-s=
izing:content-box"><span class=3D"m_-1258501719364589994inbox-inbox-mjx-tex=
atom" style=3D"display:inline-block;box-sizing:content-box"><span class=3D"=
m_-1258501719364589994inbox-inbox-mjx-mrow" style=3D"display:inline-block;b=
ox-sizing:content-box"><span class=3D"m_-1258501719364589994inbox-inbox-mjx=
-mi" style=3D"display:inline-block;box-sizing:content-box"><span class=3D"m=
_-1258501719364589994inbox-inbox-mjx-char m_-1258501719364589994inbox-inbox=
-MJXc-TeX-main-I" style=3D"display:block;white-space:pre-wrap;font-style:it=
alic;padding-top:0.225em;padding-bottom:0.298em;box-sizing:content-box">o</=
span></span><span class=3D"m_-1258501719364589994inbox-inbox-mjx-mi" style=
=3D"display:inline-block;box-sizing:content-box"><span class=3D"m_-12585017=
19364589994inbox-inbox-mjx-char m_-1258501719364589994inbox-inbox-MJXc-TeX-=
main-I" style=3D"display:block;white-space:pre-wrap;font-style:italic;paddi=
ng-top:0.225em;padding-bottom:0.446em;box-sizing:content-box">p</span></spa=
n><span class=3D"m_-1258501719364589994inbox-inbox-mjx-mi" style=3D"display=
:inline-block;box-sizing:content-box"><span class=3D"m_-1258501719364589994=
inbox-inbox-mjx-char m_-1258501719364589994inbox-inbox-MJXc-TeX-main-I" sty=
le=3D"display:block;white-space:pre-wrap;font-style:italic;padding-top:0.37=
2em;padding-bottom:0.298em;box-sizing:content-box">t</span></span></span></=
span></span></span></span></span></span>
<span style=3D"background-color:rgb(255,255,0)"><span class=3D"m_-12585017=
19364589994inbox-inbox-terminal" style=3D"font-family:monospace;font-style:=
normal">auto &&__range =3D</span> <i><a href=3D"http://eel.is/c++dr=
aft/stmt.iter#nt:for-range-initializer" style=3D"text-decoration-line:none"=
target=3D"_blank">for-range-initializer</a></i> <span class=3D"m_-12585017=
19364589994inbox-inbox-terminal" style=3D"font-family:monospace;font-style:=
normal">;<div class=3D"gmail_default" style=3D"font-family:arial,helvetica,=
sans-serif;display:inline">=E2=80=8B << is this not an assignment=
?=E2=80=8B</div></span></span>
<span class=3D"m_-1258501719364589994inbox-inbox-terminal" style=3D"font-f=
amily:monospace;font-style:normal">auto __begin =3D</span> begin-expr <span=
class=3D"m_-1258501719364589994inbox-inbox-terminal" style=3D"font-family:=
monospace;font-style:normal">;</span>
<span class=3D"m_-1258501719364589994inbox-inbox-terminal" style=3D"font-f=
amily:monospace;font-style:normal">auto __end =3D</span> end-expr <span cla=
ss=3D"m_-1258501719364589994inbox-inbox-terminal" style=3D"font-family:mono=
space;font-style:normal">;</span>
<span class=3D"m_-1258501719364589994inbox-inbox-terminal" style=3D"font-f=
amily:monospace;font-style:normal">for ( ; __begin !=3D __end; ++__begin ) =
{</span>
<i><a href=3D"http://eel.is/c++draft/stmt.iter#nt:for-range-declaration" =
style=3D"text-decoration-line:none" target=3D"_blank">for-range-declaration=
</a></i> <span class=3D"m_-1258501719364589994inbox-inbox-terminal" style=
=3D"font-family:monospace;font-style:normal">=3D *__begin;</span>
<i><a href=3D"http://eel.is/c++draft/stmt.stmt#nt:statement" style=3D"tex=
t-decoration-line:none" target=3D"_blank">statement</a></i>
<span class=3D"m_-1258501719364589994inbox-inbox-terminal" style=3D"font-f=
amily:monospace;font-style:normal">}</span>
<span class=3D"m_-1258501719364589994inbox-inbox-terminal" style=3D"font-fa=
mily:monospace;font-style:normal">}</span>
</pre><span style=3D"font-family:serif;font-size:medium;text-align:justify"=
></span>And this:=C2=A0<a href=3D"https://godbolt.org/g/yUWr6x" target=3D"_=
blank">https://godbolt.org/g/<wbr>yUWr6x</a>=C2=A0just works (which is obvi=
ous when you actually read the specs).</div></div></blockquote><div><br></d=
iv><div class=3D"gmail_default" style=3D"font-family:arial,helvetica,sans-s=
erif">=E2=80=8BYour class has no non-trivial destruction semantics.</div><d=
iv class=3D"gmail_default" style=3D"font-family:arial,helvetica,sans-serif"=
><br></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/CAJnXXojRPQKWaLcyiGCKxDbfhO31VCMzoXE2=
aDcRknOM4FvTUA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAJnXXojRPQKWaLcy=
iGCKxDbfhO31VCMzoXE2aDcRknOM4FvTUA%40mail.gmail.com</a>.<br />
--94eb2c0cf7b4663aaa05665a789f--
.
Author: =?UTF-8?Q?Micha=C5=82_Dominiak?= <griwes@griwes.info>
Date: Thu, 01 Mar 2018 14:42:08 +0000
Raw View
--001a114d962cdad91405665add89
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
No, that is not an assignment. First, the type is `auto &&`, so it binds a
reference, not assigns (plus it extends the lifetime). Also, even if that
was `auto`, it'd still not be assignment - it'd be copy construction
(which'd be elided by the C++17 rules).
As for your last statement... what does it matter? Now it does:
https://godbolt.org/g/nkS6gc.
On Thu, Mar 1, 2018 at 3:13 PM John Yates <john@yates-sheets.org> wrote:
> On Thu, Mar 1, 2018 at 9:02 AM, Micha=C5=82 Dominiak <griwes@griwes.info>
> wrote:
>
>> Please explain where do you see assignment in the range for loop
>> semantics? Because that's not what the standard says.
>>
>> http://eel.is/c++draft/stmt.ranged:
>>
>> The range-based for statement
>>
>> for ( *init-statement <http://eel.is/c++draft/stmt.stmt#nt:init-statemen=
t>*opt *for-range-declaration <http://eel.is/c++draft/stmt.iter#nt:for-rang=
e-declaration>* : *for-range-initializer <http://eel.is/c++draft/stmt.iter#=
nt:for-range-initializer>* ) *statement <http://eel.is/c++draft/stmt.stmt#n=
t:statement>*
>>
>> is equivalent to
>>
> {
>> *init-statement <http://eel.is/c++draft/stmt.stmt#nt:init-statement>*op=
t
>> auto &&__range =3D *for-range-initializer <http://eel.is/c++draft/stmt.=
iter#nt:for-range-initializer>* ;
>> =E2=80=8B << is this not an assignment?=E2=80=8B
>>
>>
>> auto __begin =3D begin-expr ;
>> auto __end =3D end-expr ;
>> for ( ; __begin !=3D __end; ++__begin ) {
>> *for-range-declaration <http://eel.is/c++draft/stmt.iter#nt:for-range-=
declaration>* =3D *__begin;
>> *statement <http://eel.is/c++draft/stmt.stmt#nt:statement>*
>> }}
>>
>> And this: https://godbolt.org/g/yUWr6x just works (which is obvious when
>> you actually read the specs).
>>
>
> =E2=80=8BYour class has no non-trivial destruction semantics.
>
> --
> 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/CAJnXXojRPQK=
WaLcyiGCKxDbfhO31VCMzoXE2aDcRknOM4FvTUA%40mail.gmail.com
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAJnXXojRPQ=
KWaLcyiGCKxDbfhO31VCMzoXE2aDcRknOM4FvTUA%40mail.gmail.com?utm_medium=3Demai=
l&utm_source=3Dfooter>
> .
>
--=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/CAPCFJdR2K_Np90jPbfdthOUeGDDBMyR5KpTe06E62Nu-SGy=
bmw%40mail.gmail.com.
--001a114d962cdad91405665add89
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">No, that is not an assignment. First, the type is `auto &a=
mp;&`, so it binds a reference, not assigns (plus it extends the lifeti=
me). Also, even if that was `auto`, it'd still not be assignment - it&#=
39;d be copy construction (which'd be elided by the C++17 rules).<div><=
br></div><div>As for your last statement... what does it matter? Now it doe=
s:=C2=A0<a href=3D"https://godbolt.org/g/nkS6gc">https://godbolt.org/g/nkS6=
gc</a>.</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Thu, =
Mar 1, 2018 at 3:13 PM John Yates <<a href=3D"mailto:john@yates-sheets.o=
rg">john@yates-sheets.org</a>> wrote:<br></div><blockquote class=3D"gmai=
l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left=
:1ex"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:ar=
ial,helvetica,sans-serif"><span style=3D"font-family:arial,sans-serif">On T=
hu, Mar 1, 2018 at 9:02 AM, Micha=C5=82 Dominiak </span><span dir=3D"ltr" s=
tyle=3D"font-family:arial,sans-serif"><<a href=3D"mailto:griwes@griwes.i=
nfo" target=3D"_blank">griwes@griwes.info</a>></span><span style=3D"font=
-family:arial,sans-serif"> wrote:</span><br></div></div><div dir=3D"ltr"><d=
iv class=3D"gmail_extra"><div class=3D"gmail_quote"><blockquote class=3D"gm=
ail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-le=
ft:1ex"><div dir=3D"ltr">Please explain where do you see assignment in the =
range for loop semantics? Because that's not what the standard says.<di=
v><br></div><div><div><a href=3D"http://eel.is/c++draft/stmt.ranged" target=
=3D"_blank">http://eel.is/c++draft/stmt.ranged</a>:<br></div></div><div><br=
></div></div></blockquote></div></div></div><div dir=3D"ltr"><div class=3D"=
gmail_extra"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div=
dir=3D"ltr"><div><span style=3D"font-family:serif;font-size:medium;text-al=
ign:justify">The range-based=C2=A0</span><span class=3D"m_-1028769309369147=
167m_-1258501719364589994inbox-inbox-texttt" style=3D"font-family:monospace=
;text-align:justify">for</span><span style=3D"font-family:serif;font-size:m=
edium;text-align:justify">=C2=A0statement</span><pre class=3D"m_-1028769309=
369147167m_-1258501719364589994inbox-inbox-ncbnf" style=3D"font-family:seri=
f;margin-top:0.5em;margin-bottom:0.5em;margin-left:40pt;font-size:medium;te=
xt-align:justify"><span class=3D"m_-1028769309369147167m_-12585017193645899=
94inbox-inbox-terminal" style=3D"font-family:monospace">for (</span> <i><a =
href=3D"http://eel.is/c++draft/stmt.stmt#nt:init-statement" style=3D"text-d=
ecoration-line:none" target=3D"_blank">init-statement</a></i><span class=3D=
"m_-1028769309369147167m_-1258501719364589994inbox-inbox-mjx-chtml" style=
=3D"display:inline-block;line-height:0;text-align:left;font-size:16px;word-=
wrap:normal;word-spacing:normal;white-space:nowrap;float:none;direction:ltr=
;max-width:none;max-height:none;min-width:0px;min-height:0px;border:0px;mar=
gin:0px;padding:1px 0px"><span class=3D"m_-1028769309369147167m_-1258501719=
364589994inbox-inbox-mjx-math" style=3D"display:inline-block;border-collaps=
e:separate"><span class=3D"m_-1028769309369147167m_-1258501719364589994inbo=
x-inbox-mjx-mrow" style=3D"display:inline-block;box-sizing:content-box"><sp=
an class=3D"m_-1028769309369147167m_-1258501719364589994inbox-inbox-mjx-msu=
bsup" style=3D"display:inline-block;box-sizing:content-box"><span class=3D"=
m_-1028769309369147167m_-1258501719364589994inbox-inbox-mjx-base" style=3D"=
display:inline-block;box-sizing:content-box"><span class=3D"m_-102876930936=
9147167m_-1258501719364589994inbox-inbox-mjx-mi" style=3D"display:inline-bl=
ock;box-sizing:content-box"><span class=3D"m_-1028769309369147167m_-1258501=
719364589994inbox-inbox-mjx-char" style=3D"display:block;white-space:pre-wr=
ap;box-sizing:content-box"></span></span></span><span class=3D"m_-102876930=
9369147167m_-1258501719364589994inbox-inbox-mjx-sub" style=3D"display:inlin=
e-block;font-size:11.312px;vertical-align:-0.212em;padding-right:0.071em;bo=
x-sizing:content-box"><span class=3D"m_-1028769309369147167m_-1258501719364=
589994inbox-inbox-mjx-texatom" style=3D"display:inline-block;box-sizing:con=
tent-box"><span class=3D"m_-1028769309369147167m_-1258501719364589994inbox-=
inbox-mjx-mrow" style=3D"display:inline-block;box-sizing:content-box"><span=
class=3D"m_-1028769309369147167m_-1258501719364589994inbox-inbox-mjx-mi" s=
tyle=3D"display:inline-block;box-sizing:content-box"><span class=3D"m_-1028=
769309369147167m_-1258501719364589994inbox-inbox-mjx-char m_-10287693093691=
47167m_-1258501719364589994inbox-inbox-MJXc-TeX-main-I" style=3D"display:bl=
ock;white-space:pre-wrap;font-style:italic;padding-top:0.225em;padding-bott=
om:0.298em;box-sizing:content-box">o</span></span><span class=3D"m_-1028769=
309369147167m_-1258501719364589994inbox-inbox-mjx-mi" style=3D"display:inli=
ne-block;box-sizing:content-box"><span class=3D"m_-1028769309369147167m_-12=
58501719364589994inbox-inbox-mjx-char m_-1028769309369147167m_-125850171936=
4589994inbox-inbox-MJXc-TeX-main-I" style=3D"display:block;white-space:pre-=
wrap;font-style:italic;padding-top:0.225em;padding-bottom:0.446em;box-sizin=
g:content-box">p</span></span><span class=3D"m_-1028769309369147167m_-12585=
01719364589994inbox-inbox-mjx-mi" style=3D"display:inline-block;box-sizing:=
content-box"><span class=3D"m_-1028769309369147167m_-1258501719364589994inb=
ox-inbox-mjx-char m_-1028769309369147167m_-1258501719364589994inbox-inbox-M=
JXc-TeX-main-I" style=3D"display:block;white-space:pre-wrap;font-style:ital=
ic;padding-top:0.372em;padding-bottom:0.298em;box-sizing:content-box">t</sp=
an></span></span></span></span></span></span></span></span> <i><a href=3D"h=
ttp://eel.is/c++draft/stmt.iter#nt:for-range-declaration" style=3D"text-dec=
oration-line:none" target=3D"_blank">for-range-declaration</a></i> <span cl=
ass=3D"m_-1028769309369147167m_-1258501719364589994inbox-inbox-terminal" st=
yle=3D"font-family:monospace">:</span> <i><a href=3D"http://eel.is/c++draft=
/stmt.iter#nt:for-range-initializer" style=3D"text-decoration-line:none" ta=
rget=3D"_blank">for-range-initializer</a></i> <span class=3D"m_-10287693093=
69147167m_-1258501719364589994inbox-inbox-terminal" style=3D"font-family:mo=
nospace">)</span> <i><a href=3D"http://eel.is/c++draft/stmt.stmt#nt:stateme=
nt" style=3D"text-decoration-line:none" target=3D"_blank">statement</a></i>
</pre><span style=3D"font-family:serif;font-size:medium;text-align:justify"=
>is equivalent to</span></div></div></blockquote></div></div></div><div dir=
=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote"><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><pre class=3D"m_-10287693093691471=
67m_-1258501719364589994inbox-inbox-ncbnftab" style=3D"font-family:serif;fo=
nt-style:italic;margin-top:0.5em;margin-bottom:0.5em;margin-left:40pt;font-=
size:medium;text-align:justify"><span class=3D"m_-1028769309369147167m_-125=
8501719364589994inbox-inbox-terminal" style=3D"font-family:monospace;font-s=
tyle:normal">{</span>
<i><a href=3D"http://eel.is/c++draft/stmt.stmt#nt:init-statement" style=3D=
"text-decoration-line:none" target=3D"_blank">init-statement</a></i><span c=
lass=3D"m_-1028769309369147167m_-1258501719364589994inbox-inbox-mjx-chtml" =
style=3D"display:inline-block;line-height:0;text-align:left;font-style:norm=
al;font-size:16px;word-wrap:normal;word-spacing:normal;white-space:nowrap;f=
loat:none;direction:ltr;max-width:none;max-height:none;min-width:0px;min-he=
ight:0px;border:0px;margin:0px;padding:1px 0px"><span class=3D"m_-102876930=
9369147167m_-1258501719364589994inbox-inbox-mjx-math" style=3D"display:inli=
ne-block;border-collapse:separate"><span class=3D"m_-1028769309369147167m_-=
1258501719364589994inbox-inbox-mjx-mrow" style=3D"display:inline-block;box-=
sizing:content-box"><span class=3D"m_-1028769309369147167m_-125850171936458=
9994inbox-inbox-mjx-msubsup" style=3D"display:inline-block;box-sizing:conte=
nt-box"><span class=3D"m_-1028769309369147167m_-1258501719364589994inbox-in=
box-mjx-base" style=3D"display:inline-block;box-sizing:content-box"><span c=
lass=3D"m_-1028769309369147167m_-1258501719364589994inbox-inbox-mjx-mi" sty=
le=3D"display:inline-block;box-sizing:content-box"><span class=3D"m_-102876=
9309369147167m_-1258501719364589994inbox-inbox-mjx-char" style=3D"display:b=
lock;white-space:pre-wrap;box-sizing:content-box"></span></span></span><spa=
n class=3D"m_-1028769309369147167m_-1258501719364589994inbox-inbox-mjx-sub"=
style=3D"display:inline-block;font-size:11.312px;vertical-align:-0.212em;p=
adding-right:0.071em;box-sizing:content-box"><span class=3D"m_-102876930936=
9147167m_-1258501719364589994inbox-inbox-mjx-texatom" style=3D"display:inli=
ne-block;box-sizing:content-box"><span class=3D"m_-1028769309369147167m_-12=
58501719364589994inbox-inbox-mjx-mrow" style=3D"display:inline-block;box-si=
zing:content-box"><span class=3D"m_-1028769309369147167m_-12585017193645899=
94inbox-inbox-mjx-mi" style=3D"display:inline-block;box-sizing:content-box"=
><span class=3D"m_-1028769309369147167m_-1258501719364589994inbox-inbox-mjx=
-char m_-1028769309369147167m_-1258501719364589994inbox-inbox-MJXc-TeX-main=
-I" style=3D"display:block;white-space:pre-wrap;font-style:italic;padding-t=
op:0.225em;padding-bottom:0.298em;box-sizing:content-box">o</span></span><s=
pan class=3D"m_-1028769309369147167m_-1258501719364589994inbox-inbox-mjx-mi=
" style=3D"display:inline-block;box-sizing:content-box"><span class=3D"m_-1=
028769309369147167m_-1258501719364589994inbox-inbox-mjx-char m_-10287693093=
69147167m_-1258501719364589994inbox-inbox-MJXc-TeX-main-I" style=3D"display=
:block;white-space:pre-wrap;font-style:italic;padding-top:0.225em;padding-b=
ottom:0.446em;box-sizing:content-box">p</span></span><span class=3D"m_-1028=
769309369147167m_-1258501719364589994inbox-inbox-mjx-mi" style=3D"display:i=
nline-block;box-sizing:content-box"><span class=3D"m_-1028769309369147167m_=
-1258501719364589994inbox-inbox-mjx-char m_-1028769309369147167m_-125850171=
9364589994inbox-inbox-MJXc-TeX-main-I" style=3D"display:block;white-space:p=
re-wrap;font-style:italic;padding-top:0.372em;padding-bottom:0.298em;box-si=
zing:content-box">t</span></span></span></span></span></span></span></span>=
</span>
<span style=3D"background-color:rgb(255,255,0)"><span class=3D"m_-10287693=
09369147167m_-1258501719364589994inbox-inbox-terminal" style=3D"font-family=
:monospace;font-style:normal">auto &&__range =3D</span> <i><a href=
=3D"http://eel.is/c++draft/stmt.iter#nt:for-range-initializer" style=3D"tex=
t-decoration-line:none" target=3D"_blank">for-range-initializer</a></i> <sp=
an class=3D"m_-1028769309369147167m_-1258501719364589994inbox-inbox-termina=
l" style=3D"font-family:monospace;font-style:normal">;<div class=3D"gmail_d=
efault" style=3D"font-family:arial,helvetica,sans-serif;display:inline">=E2=
=80=8B << is this not an assignment?=E2=80=8B</div></span></span>=
</pre></div></div></blockquote></div></div></div><div dir=3D"ltr"><div clas=
s=3D"gmail_extra"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quo=
te" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"=
><div dir=3D"ltr"><div><pre class=3D"m_-1028769309369147167m_-1258501719364=
589994inbox-inbox-ncbnftab" style=3D"font-family:serif;font-style:italic;ma=
rgin-top:0.5em;margin-bottom:0.5em;margin-left:40pt;font-size:medium;text-a=
lign:justify">
<span class=3D"m_-1028769309369147167m_-1258501719364589994inbox-inbox-ter=
minal" style=3D"font-family:monospace;font-style:normal">auto __begin =3D</=
span> begin-expr <span class=3D"m_-1028769309369147167m_-125850171936458999=
4inbox-inbox-terminal" style=3D"font-family:monospace;font-style:normal">;<=
/span>
<span class=3D"m_-1028769309369147167m_-1258501719364589994inbox-inbox-ter=
minal" style=3D"font-family:monospace;font-style:normal">auto __end =3D</sp=
an> end-expr <span class=3D"m_-1028769309369147167m_-1258501719364589994inb=
ox-inbox-terminal" style=3D"font-family:monospace;font-style:normal">;</spa=
n>
<span class=3D"m_-1028769309369147167m_-1258501719364589994inbox-inbox-ter=
minal" style=3D"font-family:monospace;font-style:normal">for ( ; __begin !=
=3D __end; ++__begin ) {</span>
<i><a href=3D"http://eel.is/c++draft/stmt.iter#nt:for-range-declaration" =
style=3D"text-decoration-line:none" target=3D"_blank">for-range-declaration=
</a></i> <span class=3D"m_-1028769309369147167m_-1258501719364589994inbox-i=
nbox-terminal" style=3D"font-family:monospace;font-style:normal">=3D *__beg=
in;</span>
<i><a href=3D"http://eel.is/c++draft/stmt.stmt#nt:statement" style=3D"tex=
t-decoration-line:none" target=3D"_blank">statement</a></i>
<span class=3D"m_-1028769309369147167m_-1258501719364589994inbox-inbox-ter=
minal" style=3D"font-family:monospace;font-style:normal">}</span>
<span class=3D"m_-1028769309369147167m_-1258501719364589994inbox-inbox-term=
inal" style=3D"font-family:monospace;font-style:normal">}</span>
</pre></div></div></blockquote></div></div></div><div dir=3D"ltr"><div clas=
s=3D"gmail_extra"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quo=
te" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"=
><div dir=3D"ltr"><div><span style=3D"font-family:serif;font-size:medium;te=
xt-align:justify"></span>And this:=C2=A0<a href=3D"https://godbolt.org/g/yU=
Wr6x" target=3D"_blank">https://godbolt.org/g/yUWr6x</a>=C2=A0just works (w=
hich is obvious when you actually read the specs).</div></div></blockquote>=
</div></div></div><div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D=
"gmail_quote"><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></div></=
div></blockquote><div><br></div><div class=3D"gmail_default" style=3D"font-=
family:arial,helvetica,sans-serif">=E2=80=8BYour class has no non-trivial d=
estruction semantics.</div><div class=3D"gmail_default" style=3D"font-famil=
y:arial,helvetica,sans-serif"><br></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" 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/CAJnXXojRPQKWaLcyiGCKxDbfhO31VCMzoXE2=
aDcRknOM4FvTUA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
target=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-propo=
sals/CAJnXXojRPQKWaLcyiGCKxDbfhO31VCMzoXE2aDcRknOM4FvTUA%40mail.gmail.com</=
a>.<br>
</blockquote></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/CAPCFJdR2K_Np90jPbfdthOUeGDDBMyR5KpTe=
06E62Nu-SGybmw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAPCFJdR2K_Np90jP=
bfdthOUeGDDBMyR5KpTe06E62Nu-SGybmw%40mail.gmail.com</a>.<br />
--001a114d962cdad91405665add89--
.
Author: John Yates <john@yates-sheets.org>
Date: Thu, 1 Mar 2018 09:50:06 -0500
Raw View
--001a11430c8ac662fa05665af924
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Thank you for taking the time to reply. You have convinced me.
/john
On Thu, Mar 1, 2018 at 9:42 AM, Micha=C5=82 Dominiak <griwes@griwes.info> w=
rote:
> No, that is not an assignment. First, the type is `auto &&`, so it binds =
a
> reference, not assigns (plus it extends the lifetime). Also, even if that
> was `auto`, it'd still not be assignment - it'd be copy construction
> (which'd be elided by the C++17 rules).
>
> As for your last statement... what does it matter? Now it does:
> https://godbolt.org/g/nkS6gc.
>
> On Thu, Mar 1, 2018 at 3:13 PM John Yates <john@yates-sheets.org> wrote:
>
>> On Thu, Mar 1, 2018 at 9:02 AM, Micha=C5=82 Dominiak <griwes@griwes.info=
>
>> wrote:
>>
>>> Please explain where do you see assignment in the range for loop
>>> semantics? Because that's not what the standard says.
>>>
>>> http://eel.is/c++draft/stmt.ranged:
>>>
>>> The range-based for statement
>>>
>>> for ( *init-statement <http://eel.is/c++draft/stmt.stmt#nt:init-stateme=
nt>*opt *for-range-declaration <http://eel.is/c++draft/stmt.iter#nt:for-ran=
ge-declaration>* : *for-range-initializer <http://eel.is/c++draft/stmt.iter=
#nt:for-range-initializer>* ) *statement <http://eel.is/c++draft/stmt.stmt#=
nt:statement>*
>>>
>>> is equivalent to
>>>
>> {
>>> *init-statement <http://eel.is/c++draft/stmt.stmt#nt:init-statement>*o=
pt
>>> auto &&__range =3D *for-range-initializer <http://eel.is/c++draft/stmt=
..iter#nt:for-range-initializer>* ;
>>> =E2=80=8B << is this not an assignment?=E2=80=8B
>>>
>>> auto __begin =3D begin-expr ;
>>> auto __end =3D end-expr ;
>>> for ( ; __begin !=3D __end; ++__begin ) {
>>> *for-range-declaration <http://eel.is/c++draft/stmt.iter#nt:for-range=
-declaration>* =3D *__begin;
>>> *statement <http://eel.is/c++draft/stmt.stmt#nt:statement>*
>>> }}
>>>
>>> And this: https://godbolt.org/g/yUWr6x just works (which is obvious
>>> when you actually read the specs).
>>>
>>
>> =E2=80=8BYour class has no non-trivial destruction semantics.
>>
>> --
>> You received this message because you are subscribed to the Google Group=
s
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n
>> 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/CAJnXXojRPQKWaLcyiGCKxDbfhO31V
>> CMzoXE2aDcRknOM4FvTUA%40mail.gmail.com
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAJnXXojRP=
QKWaLcyiGCKxDbfhO31VCMzoXE2aDcRknOM4FvTUA%40mail.gmail.com?utm_medium=3Dema=
il&utm_source=3Dfooter>
>> .
>>
> --
> 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/CAPCFJdR2K_Np90jPbfdthOUeGDDBMyR5KpTe06E=
6
> 2Nu-SGybmw%40mail.gmail.com
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAPCFJdR2K_=
Np90jPbfdthOUeGDDBMyR5KpTe06E62Nu-SGybmw%40mail.gmail.com?utm_medium=3Demai=
l&utm_source=3Dfooter>
> .
>
--=20
John Yates
505 Tremont St, #803
Boston, MA 02116
--=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/CAJnXXogMDS7J_64HUw20F0B7skeHrnK5d2t7TBvReQ2R2%2=
BOQEA%40mail.gmail.com.
--001a11430c8ac662fa05665af924
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:arial,he=
lvetica,sans-serif">Thank you for taking the time to reply.=C2=A0 You have =
convinced me.</div><div class=3D"gmail_default" style=3D"font-family:arial,=
helvetica,sans-serif"><br></div><div class=3D"gmail_default" style=3D"font-=
family:arial,helvetica,sans-serif">/john</div></div><div class=3D"gmail_ext=
ra"><br><div class=3D"gmail_quote">On Thu, Mar 1, 2018 at 9:42 AM, Micha=C5=
=82 Dominiak <span dir=3D"ltr"><<a href=3D"mailto:griwes@griwes.info" ta=
rget=3D"_blank">griwes@griwes.info</a>></span> wrote:<br><blockquote cla=
ss=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pa=
dding-left:1ex"><div dir=3D"ltr">No, that is not an assignment. First, the =
type is `auto &&`, so it binds a reference, not assigns (plus it ex=
tends the lifetime). Also, even if that was `auto`, it'd still not be a=
ssignment - it'd be copy construction (which'd be elided by the C++=
17 rules).<div><br></div><div>As for your last statement... what does it ma=
tter? Now it does:=C2=A0<a href=3D"https://godbolt.org/g/nkS6gc" target=3D"=
_blank">https://godbolt.org/g/<wbr>nkS6gc</a>.</div></div><br><div class=3D=
"gmail_quote"><div><div class=3D"h5"><div dir=3D"ltr">On Thu, Mar 1, 2018 a=
t 3:13 PM John Yates <<a href=3D"mailto:john@yates-sheets.org" target=3D=
"_blank">john@yates-sheets.org</a>> wrote:<br></div></div></div><blockqu=
ote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc s=
olid;padding-left:1ex"><div><div class=3D"h5"><div dir=3D"ltr"><div class=
=3D"gmail_default" style=3D"font-family:arial,helvetica,sans-serif"><span s=
tyle=3D"font-family:arial,sans-serif">On Thu, Mar 1, 2018 at 9:02 AM, Micha=
=C5=82 Dominiak </span><span dir=3D"ltr" style=3D"font-family:arial,sans-se=
rif"><<a href=3D"mailto:griwes@griwes.info" target=3D"_blank">griwes@gri=
wes.info</a>></span><span style=3D"font-family:arial,sans-serif"> wrote:=
</span><br></div></div><div dir=3D"ltr"><div class=3D"gmail_extra"><div cla=
ss=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 =
..8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">Please e=
xplain where do you see assignment in the range for loop semantics? Because=
that's not what the standard says.<div><br></div><div><div><a href=3D"=
http://eel.is/c++draft/stmt.ranged" target=3D"_blank">http://eel.is/c++draf=
t/stmt.<wbr>ranged</a>:<br></div></div><div><br></div></div></blockquote></=
div></div></div><div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"g=
mail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bo=
rder-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><span styl=
e=3D"font-family:serif;font-size:medium;text-align:justify">The range-based=
=C2=A0</span><span class=3D"m_4765108076579451548m_-1028769309369147167m_-1=
258501719364589994inbox-inbox-texttt" style=3D"font-family:monospace;text-a=
lign:justify">for</span><span style=3D"font-family:serif;font-size:medium;t=
ext-align:justify">=C2=A0statement</span><pre class=3D"m_476510807657945154=
8m_-1028769309369147167m_-1258501719364589994inbox-inbox-ncbnf" style=3D"fo=
nt-family:serif;margin-top:0.5em;margin-bottom:0.5em;margin-left:40pt;font-=
size:medium;text-align:justify"><span class=3D"m_4765108076579451548m_-1028=
769309369147167m_-1258501719364589994inbox-inbox-terminal" style=3D"font-fa=
mily:monospace">for (</span> <i><a href=3D"http://eel.is/c++draft/stmt.stmt=
#nt:init-statement" style=3D"text-decoration-line:none" target=3D"_blank">i=
nit-statement</a></i><span class=3D"m_4765108076579451548m_-102876930936914=
7167m_-1258501719364589994inbox-inbox-mjx-chtml" style=3D"display:inline-bl=
ock;line-height:0;text-align:left;font-size:16px;word-wrap:normal;word-spac=
ing:normal;white-space:nowrap;float:none;direction:ltr;max-width:none;max-h=
eight:none;min-width:0px;min-height:0px;border:0px;margin:0px;padding:1px 0=
px"><span class=3D"m_4765108076579451548m_-1028769309369147167m_-1258501719=
364589994inbox-inbox-mjx-math" style=3D"display:inline-block;border-collaps=
e:separate"><span class=3D"m_4765108076579451548m_-1028769309369147167m_-12=
58501719364589994inbox-inbox-mjx-mrow" style=3D"display:inline-block;box-si=
zing:content-box"><span class=3D"m_4765108076579451548m_-102876930936914716=
7m_-1258501719364589994inbox-inbox-mjx-msubsup" style=3D"display:inline-blo=
ck;box-sizing:content-box"><span class=3D"m_4765108076579451548m_-102876930=
9369147167m_-1258501719364589994inbox-inbox-mjx-base" style=3D"display:inli=
ne-block;box-sizing:content-box"><span class=3D"m_4765108076579451548m_-102=
8769309369147167m_-1258501719364589994inbox-inbox-mjx-mi" style=3D"display:=
inline-block;box-sizing:content-box"><span class=3D"m_4765108076579451548m_=
-1028769309369147167m_-1258501719364589994inbox-inbox-mjx-char" style=3D"di=
splay:block;white-space:pre-wrap;box-sizing:content-box"></span></span></sp=
an><span class=3D"m_4765108076579451548m_-1028769309369147167m_-12585017193=
64589994inbox-inbox-mjx-sub" style=3D"display:inline-block;font-size:11.312=
px;vertical-align:-0.212em;padding-right:0.071em;box-sizing:content-box"><s=
pan class=3D"m_4765108076579451548m_-1028769309369147167m_-1258501719364589=
994inbox-inbox-mjx-texatom" style=3D"display:inline-block;box-sizing:conten=
t-box"><span class=3D"m_4765108076579451548m_-1028769309369147167m_-1258501=
719364589994inbox-inbox-mjx-mrow" style=3D"display:inline-block;box-sizing:=
content-box"><span class=3D"m_4765108076579451548m_-1028769309369147167m_-1=
258501719364589994inbox-inbox-mjx-mi" style=3D"display:inline-block;box-siz=
ing:content-box"><span class=3D"m_4765108076579451548m_-1028769309369147167=
m_-1258501719364589994inbox-inbox-mjx-char m_4765108076579451548m_-10287693=
09369147167m_-1258501719364589994inbox-inbox-MJXc-TeX-main-I" style=3D"disp=
lay:block;white-space:pre-wrap;font-style:italic;padding-top:0.225em;paddin=
g-bottom:0.298em;box-sizing:content-box">o</span></span><span class=3D"m_47=
65108076579451548m_-1028769309369147167m_-1258501719364589994inbox-inbox-mj=
x-mi" style=3D"display:inline-block;box-sizing:content-box"><span class=3D"=
m_4765108076579451548m_-1028769309369147167m_-1258501719364589994inbox-inbo=
x-mjx-char m_4765108076579451548m_-1028769309369147167m_-125850171936458999=
4inbox-inbox-MJXc-TeX-main-I" style=3D"display:block;white-space:pre-wrap;f=
ont-style:italic;padding-top:0.225em;padding-bottom:0.446em;box-sizing:cont=
ent-box">p</span></span><span class=3D"m_4765108076579451548m_-102876930936=
9147167m_-1258501719364589994inbox-inbox-mjx-mi" style=3D"display:inline-bl=
ock;box-sizing:content-box"><span class=3D"m_4765108076579451548m_-10287693=
09369147167m_-1258501719364589994inbox-inbox-mjx-char m_4765108076579451548=
m_-1028769309369147167m_-1258501719364589994inbox-inbox-MJXc-TeX-main-I" st=
yle=3D"display:block;white-space:pre-wrap;font-style:italic;padding-top:0.3=
72em;padding-bottom:0.298em;box-sizing:content-box">t</span></span></span><=
/span></span></span></span></span></span> <i><a href=3D"http://eel.is/c++dr=
aft/stmt.iter#nt:for-range-declaration" style=3D"text-decoration-line:none"=
target=3D"_blank">for-range-declaration</a></i> <span class=3D"m_476510807=
6579451548m_-1028769309369147167m_-1258501719364589994inbox-inbox-terminal"=
style=3D"font-family:monospace">:</span> <i><a href=3D"http://eel.is/c++dr=
aft/stmt.iter#nt:for-range-initializer" style=3D"text-decoration-line:none"=
target=3D"_blank">for-range-initializer</a></i> <span class=3D"m_476510807=
6579451548m_-1028769309369147167m_-1258501719364589994inbox-inbox-terminal"=
style=3D"font-family:monospace">)</span> <i><a href=3D"http://eel.is/c++dr=
aft/stmt.stmt#nt:statement" style=3D"text-decoration-line:none" target=3D"_=
blank">statement</a></i>
</pre><span style=3D"font-family:serif;font-size:medium;text-align:justify"=
>is equivalent to</span></div></div></blockquote></div></div></div><div dir=
=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote"><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><pre class=3D"m_476510807657945154=
8m_-1028769309369147167m_-1258501719364589994inbox-inbox-ncbnftab" style=3D=
"font-family:serif;font-style:italic;margin-top:0.5em;margin-bottom:0.5em;m=
argin-left:40pt;font-size:medium;text-align:justify"><span class=3D"m_47651=
08076579451548m_-1028769309369147167m_-1258501719364589994inbox-inbox-termi=
nal" style=3D"font-family:monospace;font-style:normal">{</span>
<i><a href=3D"http://eel.is/c++draft/stmt.stmt#nt:init-statement" style=3D=
"text-decoration-line:none" target=3D"_blank">init-statement</a></i><span c=
lass=3D"m_4765108076579451548m_-1028769309369147167m_-1258501719364589994in=
box-inbox-mjx-chtml" style=3D"display:inline-block;line-height:0;text-align=
:left;font-style:normal;font-size:16px;word-wrap:normal;word-spacing:normal=
;white-space:nowrap;float:none;direction:ltr;max-width:none;max-height:none=
;min-width:0px;min-height:0px;border:0px;margin:0px;padding:1px 0px"><span =
class=3D"m_4765108076579451548m_-1028769309369147167m_-1258501719364589994i=
nbox-inbox-mjx-math" style=3D"display:inline-block;border-collapse:separate=
"><span class=3D"m_4765108076579451548m_-1028769309369147167m_-125850171936=
4589994inbox-inbox-mjx-mrow" style=3D"display:inline-block;box-sizing:conte=
nt-box"><span class=3D"m_4765108076579451548m_-1028769309369147167m_-125850=
1719364589994inbox-inbox-mjx-msubsup" style=3D"display:inline-block;box-siz=
ing:content-box"><span class=3D"m_4765108076579451548m_-1028769309369147167=
m_-1258501719364589994inbox-inbox-mjx-base" style=3D"display:inline-block;b=
ox-sizing:content-box"><span class=3D"m_4765108076579451548m_-1028769309369=
147167m_-1258501719364589994inbox-inbox-mjx-mi" style=3D"display:inline-blo=
ck;box-sizing:content-box"><span class=3D"m_4765108076579451548m_-102876930=
9369147167m_-1258501719364589994inbox-inbox-mjx-char" style=3D"display:bloc=
k;white-space:pre-wrap;box-sizing:content-box"></span></span></span><span c=
lass=3D"m_4765108076579451548m_-1028769309369147167m_-1258501719364589994in=
box-inbox-mjx-sub" style=3D"display:inline-block;font-size:11.312px;vertica=
l-align:-0.212em;padding-right:0.071em;box-sizing:content-box"><span class=
=3D"m_4765108076579451548m_-1028769309369147167m_-1258501719364589994inbox-=
inbox-mjx-texatom" style=3D"display:inline-block;box-sizing:content-box"><s=
pan class=3D"m_4765108076579451548m_-1028769309369147167m_-1258501719364589=
994inbox-inbox-mjx-mrow" style=3D"display:inline-block;box-sizing:content-b=
ox"><span class=3D"m_4765108076579451548m_-1028769309369147167m_-1258501719=
364589994inbox-inbox-mjx-mi" style=3D"display:inline-block;box-sizing:conte=
nt-box"><span class=3D"m_4765108076579451548m_-1028769309369147167m_-125850=
1719364589994inbox-inbox-mjx-char m_4765108076579451548m_-10287693093691471=
67m_-1258501719364589994inbox-inbox-MJXc-TeX-main-I" style=3D"display:block=
;white-space:pre-wrap;font-style:italic;padding-top:0.225em;padding-bottom:=
0.298em;box-sizing:content-box">o</span></span><span class=3D"m_47651080765=
79451548m_-1028769309369147167m_-1258501719364589994inbox-inbox-mjx-mi" sty=
le=3D"display:inline-block;box-sizing:content-box"><span class=3D"m_4765108=
076579451548m_-1028769309369147167m_-1258501719364589994inbox-inbox-mjx-cha=
r m_4765108076579451548m_-1028769309369147167m_-1258501719364589994inbox-in=
box-MJXc-TeX-main-I" style=3D"display:block;white-space:pre-wrap;font-style=
:italic;padding-top:0.225em;padding-bottom:0.446em;box-sizing:content-box">=
p</span></span><span class=3D"m_4765108076579451548m_-1028769309369147167m_=
-1258501719364589994inbox-inbox-mjx-mi" style=3D"display:inline-block;box-s=
izing:content-box"><span class=3D"m_4765108076579451548m_-10287693093691471=
67m_-1258501719364589994inbox-inbox-mjx-char m_4765108076579451548m_-102876=
9309369147167m_-1258501719364589994inbox-inbox-MJXc-TeX-main-I" style=3D"di=
splay:block;white-space:pre-wrap;font-style:italic;padding-top:0.372em;padd=
ing-bottom:0.298em;box-sizing:content-box">t</span></span></span></span></s=
pan></span></span></span></span>
<span style=3D"background-color:rgb(255,255,0)"><span class=3D"m_476510807=
6579451548m_-1028769309369147167m_-1258501719364589994inbox-inbox-terminal"=
style=3D"font-family:monospace;font-style:normal">auto &&__range =
=3D</span> <i><a href=3D"http://eel.is/c++draft/stmt.iter#nt:for-range-init=
ializer" style=3D"text-decoration-line:none" target=3D"_blank">for-range-in=
itializer</a></i> <span class=3D"m_4765108076579451548m_-102876930936914716=
7m_-1258501719364589994inbox-inbox-terminal" style=3D"font-family:monospace=
;font-style:normal">;<div class=3D"gmail_default" style=3D"font-family:aria=
l,helvetica,sans-serif;display:inline">=E2=80=8B << is this not a=
n assignment?=E2=80=8B</div></span></span></pre></div></div></blockquote></=
div></div></div><div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"g=
mail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bo=
rder-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><pre class=
=3D"m_4765108076579451548m_-1028769309369147167m_-1258501719364589994inbox-=
inbox-ncbnftab" style=3D"font-family:serif;font-style:italic;margin-top:0.5=
em;margin-bottom:0.5em;margin-left:40pt;font-size:medium;text-align:justify=
"> <span class=3D"m_4765108076579451548m_-1028769309369147167m_-12585017193=
64589994inbox-inbox-terminal" style=3D"font-family:monospace;font-style:nor=
mal">auto __begin =3D</span> begin-expr <span class=3D"m_476510807657945154=
8m_-1028769309369147167m_-1258501719364589994inbox-inbox-terminal" style=3D=
"font-family:monospace;font-style:normal">;</span>
<span class=3D"m_4765108076579451548m_-1028769309369147167m_-1258501719364=
589994inbox-inbox-terminal" style=3D"font-family:monospace;font-style:norma=
l">auto __end =3D</span> end-expr <span class=3D"m_4765108076579451548m_-10=
28769309369147167m_-1258501719364589994inbox-inbox-terminal" style=3D"font-=
family:monospace;font-style:normal">;</span>
<span class=3D"m_4765108076579451548m_-1028769309369147167m_-1258501719364=
589994inbox-inbox-terminal" style=3D"font-family:monospace;font-style:norma=
l">for ( ; __begin !=3D __end; ++__begin ) {</span>
<i><a href=3D"http://eel.is/c++draft/stmt.iter#nt:for-range-declaration" =
style=3D"text-decoration-line:none" target=3D"_blank">for-range-declaration=
</a></i> <span class=3D"m_4765108076579451548m_-1028769309369147167m_-12585=
01719364589994inbox-inbox-terminal" style=3D"font-family:monospace;font-sty=
le:normal">=3D *__begin;</span>
<i><a href=3D"http://eel.is/c++draft/stmt.stmt#nt:statement" style=3D"tex=
t-decoration-line:none" target=3D"_blank">statement</a></i>
<span class=3D"m_4765108076579451548m_-1028769309369147167m_-1258501719364=
589994inbox-inbox-terminal" style=3D"font-family:monospace;font-style:norma=
l">}</span>
<span class=3D"m_4765108076579451548m_-1028769309369147167m_-12585017193645=
89994inbox-inbox-terminal" style=3D"font-family:monospace;font-style:normal=
">}</span>
</pre></div></div></blockquote></div></div></div><div dir=3D"ltr"><div clas=
s=3D"gmail_extra"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quo=
te" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"=
><div dir=3D"ltr"><div><span style=3D"font-family:serif;font-size:medium;te=
xt-align:justify"></span>And this:=C2=A0<a href=3D"https://godbolt.org/g/yU=
Wr6x" target=3D"_blank">https://godbolt.org/g/<wbr>yUWr6x</a>=C2=A0just wor=
ks (which is obvious when you actually read the specs).</div></div></blockq=
uote></div></div></div><div dir=3D"ltr"><div class=3D"gmail_extra"><div cla=
ss=3D"gmail_quote"><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></d=
iv></div></blockquote><div><br></div><div class=3D"gmail_default" style=3D"=
font-family:arial,helvetica,sans-serif">=E2=80=8BYour class has no non-triv=
ial destruction semantics.</div><div class=3D"gmail_default" style=3D"font-=
family:arial,helvetica,sans-serif"><br></div></div>
</div></div>
<p></p></div></div><span class=3D"">
-- <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" target=3D"_=
blank">std-proposals+unsubscribe@<wbr>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></span>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAJnXXojRPQKWaLcyiGCKxDbfhO31VCMzoXE2=
aDcRknOM4FvTUA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
target=3D"_blank">https://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-=
<wbr>proposals/<wbr>CAJnXXojRPQKWaLcyiGCKxDbfhO31V<wbr>CMzoXE2aDcRknOM4FvTU=
A%40mail.<wbr>gmail.com</a>.<br>
</blockquote></div><span class=3D"">
<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" target=3D"_=
blank">std-proposals+unsubscribe@<wbr>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></span>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAPCFJdR2K_Np90jPbfdthOUeGDDBMyR5KpTe=
06E62Nu-SGybmw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
target=3D"_blank">https://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-=
<wbr>proposals/CAPCFJdR2K_<wbr>Np90jPbfdthOUeGDDBMyR5KpTe06E6<wbr>2Nu-SGybm=
w%40mail.gmail.com</a>.<br>
</blockquote></div><br><br clear=3D"all"><div><br></div>-- <br><div class=
=3D"gmail_signature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr"><d=
iv><div dir=3D"ltr"><div>John Yates<br></div><div>505 Tremont St, #803</div=
><div>Boston, MA 02116</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" 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/CAJnXXogMDS7J_64HUw20F0B7skeHrnK5d2t7=
TBvReQ2R2%2BOQEA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAJnXXogMDS7J_6=
4HUw20F0B7skeHrnK5d2t7TBvReQ2R2%2BOQEA%40mail.gmail.com</a>.<br />
--001a11430c8ac662fa05665af924--
.