Topic: Proposal: Short Declaration (x := y)


Author: Andrew Tomazos <andrewtomazos@gmail.com>
Date: Mon, 2 Jun 2014 03:56:01 -0700 (PDT)
Raw View
------=_Part_2419_27166982.1401706561778
Content-Type: text/plain; charset=UTF-8

I was thinking about N3994 and had the following idea.  If this implicit
auto&& is a good idea for ranged-for-loops, why not use it for other
declarations as well?

To start, suppose we said that:

    x = y;

where name lookup doesn't find x - isn't ill-formed any longer - but is a
simple declaration with an implicit auto&&:

    x = y; // equivalent to:  auto&& x = y;

One problem with this is that a typo changes the meaning:

    int f()
    {
        color = 42; // new variable color created

        ...

        colour = 43; // oops: new variable colour created, not assignment
to color variable

        ...

        return color; // oops: returns 42 not 43 as intented
    }

Many scripting languages (like python for example) have this gotcha.

So my idea would be to instead introduce a := token:

    x := y; // equivalent to: auto&& x = y;

Note we have [class.temporary]/5 which says roughly that a temporary in
most sensible circumstances is life-time extended around a reference to
which it is bound.

Anyway, the proposal is fairly simple:

GRAMMAR

    simple-declaration:
        short-declaration
        ...

    short-declaration:
        identifier := initializer;

WORDING

    A short-declaration of the form X := Y; is identical (by definition) to
a simple-declaration auto&& X = Y;

(TODO: add attributes)

Thoughts appreciated.
  -Andrew.

--

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

------=_Part_2419_27166982.1401706561778
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I was thinking about N3994 and had the following idea. &nb=
sp;If this implicit auto&amp;&amp; is a good idea for ranged-for-loops, why=
 not use it for other declarations as well?<div><div><br></div><div>To star=
t, suppose we said that:</div><div><br></div><div>&nbsp; &nbsp; x =3D y;</d=
iv><div><br></div><div>where name lookup doesn't find x - isn't ill-formed =
any longer - but is a simple declaration with an implicit auto&amp;&amp;:</=
div><div><br></div><div>&nbsp; &nbsp; x =3D y; // equivalent to: &nbsp;auto=
&amp;&amp; x =3D y;</div><div><br></div><div>One problem with this is that =
a typo changes the meaning:</div><div><br></div><div>&nbsp; &nbsp; int f()<=
br></div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; color =
=3D 42; // new variable color created</div><div><br></div><div>&nbsp; &nbsp=
; &nbsp; &nbsp; ...</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; co=
lour =3D 43; // oops: new variable colour created, not assignment to color =
variable<br></div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; ...</div>=
<div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; return color; // oops: retu=
rns 42 not 43 as intented&nbsp;</div><div>&nbsp; &nbsp; }</div><div><br></d=
iv><div>Many scripting languages (like python for example) have this gotcha=
..</div><div><br></div><div>So my idea would be to instead introduce a :=3D =
token:&nbsp;</div><div><br></div><div>&nbsp; &nbsp; x :=3D y;&nbsp;// equiv=
alent to:&nbsp;auto&amp;&amp; x =3D y;</div><div><br></div><div>Note we hav=
e [class.temporary]/5 which says roughly that a temporary in most sensible =
circumstances is life-time extended around a reference to which it is bound=
..</div><div><br></div><div>Anyway, the proposal is fairly simple:</div><div=
><br></div><div>GRAMMAR</div><div><br></div><div>&nbsp; &nbsp;&nbsp;simple-=
declaration:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; short-declaration</div><=
div>&nbsp; &nbsp; &nbsp; &nbsp; ...</div><div><br></div><div>&nbsp; &nbsp; =
short-declaration:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; identifier :=3D&nb=
sp;initializer;</div><div><br></div><div>WORDING</div><div><br></div><div>&=
nbsp; &nbsp; A short-declaration of the form X :=3D Y; is identical (by def=
inition) to a simple-declaration auto&amp;&amp; X =3D Y;</div><div><br></di=
v><div>(TODO: add attributes)</div><div><br></div><div>Thoughts appreciated=
..</div><div>&nbsp; -Andrew.</div><div><br></div></div></div>

<p></p>

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

------=_Part_2419_27166982.1401706561778--

.


Author: Tony V E <tvaneerd@gmail.com>
Date: Mon, 2 Jun 2014 12:38:37 -0400
Raw View
--089e01182ebee39f5104fadd063c
Content-Type: text/plain; charset=UTF-8

>
> So my idea would be to instead introduce a := token:
>
>     x := y; // equivalent to: auto&& x = y;
>
>   -Andrew.
>
>
>
I'd prefer that x := y meant x = std::move(y).
(And x :=: y is swap.)

And/or I'd prefer to reserve := for some even more important concept.

Tony

--

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

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

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><div class=3D"gmail_quote">=
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div><di=
v><br></div>
<div>So my idea would be to instead introduce a :=3D token:=C2=A0</div><div=
><br></div><div>=C2=A0 =C2=A0 x :=3D y;=C2=A0// equivalent to:=C2=A0auto&am=
p;&amp; x =3D y;</div><div><br></div><span class=3D""><font color=3D"#88888=
8"><div>=C2=A0 -Andrew.</div><div><br>
</div></font></span></div></div><span class=3D""><font color=3D"#888888">

<p></p></font></span><br></blockquote></div><br><div>I&#39;d prefer that x =
:=3D y meant x =3D std::move(y).<br></div>(And x :=3D: y is swap.)<br><br><=
/div><div class=3D"gmail_extra">And/or I&#39;d prefer to reserve :=3D for s=
ome even more important concept.<br>
<br></div><div class=3D"gmail_extra">Tony<br><br></div></div>

<p></p>

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

--089e01182ebee39f5104fadd063c--

.


Author: Jan Herrmann <jherrmann79@gmx.de>
Date: Mon, 02 Jun 2014 19:14:21 +0200
Raw View
On 02.06.2014 18:38, Tony V E wrote:
>>
>> So my idea would be to instead introduce a := token:
>>
>>      x := y; // equivalent to: auto&& x = y;
>>
>>    -Andrew.
>>
>>
>>
> I'd prefer that x := y meant x = std::move(y).

And programmers, which come from pascal could use y after move instead
of getting a compile time error.

> (And x :=: y is swap.)
>
> And/or I'd prefer to reserve := for some even more important concept.
>
> Tony
>


Jan Herrmann

--

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

.


Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Mon, 2 Jun 2014 20:19:26 +0300
Raw View
On 2 June 2014 20:14, Jan Herrmann <jherrmann79@gmx.de> wrote:
> On 02.06.2014 18:38, Tony V E wrote:
>>>
>>>
>>> So my idea would be to instead introduce a := token:
>>>
>>>      x := y; // equivalent to: auto&& x = y;
>>>
>>>    -Andrew.
>>>
>>>
>>>
>> I'd prefer that x := y meant x = std::move(y).
>
>
> And programmers, which come from pascal could use y after move instead of
> getting a compile time error.


It's not a compiler error anyway, so that's not a reason not to make
it mean move.
I see a major difference between introducing a range-for-loop variable
without mentioning
its type, and doing so elsewhere. I'm not convinced this is a good idea.

--

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

.


Author: "Stephan T. Lavavej" <stl@exchange.microsoft.com>
Date: Mon, 2 Jun 2014 21:59:13 +0000
Raw View
--_000_c627d49ad70248f6a2a28cb60cb15578BN1PR03MB123namprd03pro_
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

> If this implicit auto&& is a good idea for ranged-for-loops, why not use =
it for other declarations as well?

Range-for is very special - programmers don't think of elements as being se=
parate from their containers/ranges.  Everywhere else, it is vitally import=
ant to distinguish value semantics from reference semantics.  Note that C++=
 almost always provides value semantics by default - for example, that's wh=
at you get when you say auto a =3D b;.

It would be potentially surprising and dangerous if x :=3D y created a refe=
rence bound to y, instead of a copy of y.  (Dangerous, because modification=
s to x would write through to y.)

Considered in isolation, dedicated syntax to avoid typo problems is an exce=
llent idea.  However, I do not believe that giving x :=3D y the semantics o=
f auto&& would be desirable.  Giving it the semantics of auto would elimina=
te that danger/inconsistency and would be very slightly less typing, but I =
do not believe that the benefit would outweigh the cost (of adding yet anot=
her feature/syntax to the language).  auto is already quite easy to type.

The problem I'm solving in Range-For TNG is that programmers just say "auto=
" and don't think about its implications in the range-for context - and the=
 only real way to solve that is to offer them an even more convenient lure =
of less typing.  For ordinary local variables, I do not see any particular =
problem to solve.

Thanks,
STL

From: Andrew Tomazos [mailto:andrewtomazos@gmail.com]
Sent: Monday, June 02, 2014 3:56 AM
To: std-proposals@isocpp.org
Cc: Stephan T. Lavavej
Subject: Proposal: Short Declaration (x :=3D y)

I was thinking about N3994 and had the following idea.  If this implicit au=
to&& is a good idea for ranged-for-loops, why not use it for other declarat=
ions as well?

To start, suppose we said that:

    x =3D y;

where name lookup doesn't find x - isn't ill-formed any longer - but is a s=
imple declaration with an implicit auto&&:

    x =3D y; // equivalent to:  auto&& x =3D y;

One problem with this is that a typo changes the meaning:

    int f()
    {
        color =3D 42; // new variable color created

        ...

        colour =3D 43; // oops: new variable colour created, not assignment=
 to color variable

        ...

        return color; // oops: returns 42 not 43 as intented
    }

Many scripting languages (like python for example) have this gotcha.

So my idea would be to instead introduce a :=3D token:

    x :=3D y; // equivalent to: auto&& x =3D y;

Note we have [class.temporary]/5 which says roughly that a temporary in mos=
t sensible circumstances is life-time extended around a reference to which =
it is bound.

Anyway, the proposal is fairly simple:

GRAMMAR

    simple-declaration:
        short-declaration
        ...

    short-declaration:
        identifier :=3D initializer;

WORDING

    A short-declaration of the form X :=3D Y; is identical (by definition) =
to a simple-declaration auto&& X =3D Y;

(TODO: add attributes)

Thoughts appreciated.
  -Andrew.

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

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

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8">
<meta name=3D"Generator" content=3D"Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
 {font-family:Calibri;
 panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
 {font-family:Tahoma;
 panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
 {font-family:Verdana;
 panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
 {margin:0in;
 margin-bottom:.0001pt;
 font-size:12.0pt;
 font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
 {mso-style-priority:99;
 color:blue;
 text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
 {mso-style-priority:99;
 color:purple;
 text-decoration:underline;}
span.EmailStyle17
 {mso-style-type:personal-reply;
 font-family:"Verdana","sans-serif";
 color:windowtext;}
..MsoChpDefault
 {mso-style-type:export-only;
 font-family:"Calibri","sans-serif";}
@page WordSection1
 {size:8.5in 11.0in;
 margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
 {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-US" link=3D"blue" vlink=3D"purple">
<div class=3D"WordSection1">
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;">&gt; If this implicit auto&amp;&amp; is a good idea for =
ranged-for-loops, why not use it for other declarations as well?<o:p></o:p>=
</span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;">Range-for is very special - programmers don't think of e=
lements as being separate from their containers/ranges.&nbsp; Everywhere el=
se, it is vitally important to distinguish value semantics from
 reference semantics.&nbsp; Note that C&#43;&#43; almost always provides va=
lue semantics by default - for example, that's what you get when you say au=
to a =3D b;.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;">It would be potentially surprising and dangerous if x :=
=3D y created a reference bound to y, instead of a copy of y.&nbsp; (Danger=
ous, because modifications to x would write through to y.)<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;">Considered in isolation, dedicated syntax to avoid typo =
problems is an excellent idea.&nbsp; However, I do not believe that giving =
x :=3D y the semantics of auto&amp;&amp; would be desirable.&nbsp; Giving i=
t
 the semantics of auto would eliminate that danger/inconsistency and would =
be very slightly less typing, but I do not believe that the benefit would o=
utweigh the cost (of adding yet another feature/syntax to the language).&nb=
sp; auto is already quite easy to type.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;">The problem I'm solving in Range-For TNG is that program=
mers just say &quot;auto&quot; and don't think about its implications in th=
e range-for context - and the only real way to solve that is to offer
 them an even more convenient lure of less typing.&nbsp; For ordinary local=
 variables, I do not see any particular problem to solve.<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;">Thanks,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;">STL<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><b><span style=3D"font-size:10.0pt;font-family:&quot=
;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style=3D"font-s=
ize:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> Andrew T=
omazos [mailto:andrewtomazos@gmail.com]
<br>
<b>Sent:</b> Monday, June 02, 2014 3:56 AM<br>
<b>To:</b> std-proposals@isocpp.org<br>
<b>Cc:</b> Stephan T. Lavavej<br>
<b>Subject:</b> Proposal: Short Declaration (x :=3D y)<o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class=3D"MsoNormal">I was thinking about N3994 and had the following ide=
a. &nbsp;If this implicit auto&amp;&amp; is a good idea for ranged-for-loop=
s, why not use it for other declarations as well?<o:p></o:p></p>
<div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">To start, suppose we said that:<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; &nbsp; x =3D y;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">where name lookup doesn't find x - isn't ill-formed =
any longer - but is a simple declaration with an implicit auto&amp;&amp;:<o=
:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; &nbsp; x =3D y; // equivalent to: &nbsp;auto&=
amp;&amp; x =3D y;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">One problem with this is that a typo changes the mea=
ning:<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; &nbsp; int f()<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; &nbsp; {<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; &nbsp; &nbsp; &nbsp; color =3D 42; // new var=
iable color created<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; &nbsp; &nbsp; &nbsp; ...<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; &nbsp; &nbsp; &nbsp; colour =3D 43; // oops: =
new variable colour created, not assignment to color variable<o:p></o:p></p=
>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; &nbsp; &nbsp; &nbsp; ...<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; &nbsp; &nbsp; &nbsp; return color; // oops: r=
eturns 42 not 43 as intented&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; &nbsp; }<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">Many scripting languages (like python for example) h=
ave this gotcha.<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">So my idea would be to instead introduce a :=3D toke=
n:&nbsp;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; &nbsp; x :=3D y;&nbsp;// equivalent to:&nbsp;=
auto&amp;&amp; x =3D y;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">Note we have [class.temporary]/5 which says roughly =
that a temporary in most sensible circumstances is life-time extended aroun=
d a reference to which it is bound.<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">Anyway, the proposal is fairly simple:<o:p></o:p></p=
>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">GRAMMAR<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; &nbsp;&nbsp;simple-declaration:<o:p></o:p></p=
>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; &nbsp; &nbsp; &nbsp; short-declaration<o:p></=
o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; &nbsp; &nbsp; &nbsp; ...<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; &nbsp; short-declaration:<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; &nbsp; &nbsp; &nbsp; identifier :=3D&nbsp;ini=
tializer;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">WORDING<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; &nbsp; A short-declaration of the form X :=3D=
 Y; is identical (by definition) to a simple-declaration auto&amp;&amp; X =
=3D Y;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">(TODO: add attributes)<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">Thoughts appreciated.<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; -Andrew.<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>

<p></p>

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

--_000_c627d49ad70248f6a2a28cb60cb15578BN1PR03MB123namprd03pro_--

.


Author: Philipp Maximilian Stephani <p.stephani2@gmail.com>
Date: Mon, 02 Jun 2014 22:02:27 +0000
Raw View
--bcaec54865d8061e6004fae18d99
Content-Type: text/plain; charset=UTF-8

I like the syntax (same as Go), but I agree that making this a reference by
default is confusing. I'd also take the semantics from Go: copying by
default is safe and unsurprising.

On Mon Jun 02 2014 at 23:59:20, Stephan T. Lavavej <
stl@exchange.microsoft.com> wrote:

> > If this implicit auto&& is a good idea for ranged-for-loops, why not use
> it for other declarations as well?
>
>
>
> Range-for is very special - programmers don't think of elements as being
> separate from their containers/ranges.  Everywhere else, it is vitally
> important to distinguish value semantics from reference semantics.  Note
> that C++ almost always provides value semantics by default - for example,
> that's what you get when you say auto a = b;.
>
>
>
> It would be potentially surprising and dangerous if x := y created a
> reference bound to y, instead of a copy of y.  (Dangerous, because
> modifications to x would write through to y.)
>
>
>
> Considered in isolation, dedicated syntax to avoid typo problems is an
> excellent idea.  However, I do not believe that giving x := y the semantics
> of auto&& would be desirable.  Giving it the semantics of auto would
> eliminate that danger/inconsistency and would be very slightly less typing,
> but I do not believe that the benefit would outweigh the cost (of adding
> yet another feature/syntax to the language).  auto is already quite easy to
> type.
>
>
>
> The problem I'm solving in Range-For TNG is that programmers just say
> "auto" and don't think about its implications in the range-for context -
> and the only real way to solve that is to offer them an even more
> convenient lure of less typing.  For ordinary local variables, I do not see
> any particular problem to solve.
>
>
>
> Thanks,
>
> STL
>
>
>
> *From:* Andrew Tomazos [mailto:andrewtomazos@gmail.com]
> *Sent:* Monday, June 02, 2014 3:56 AM
> *To:* std-proposals@isocpp.org
> *Cc:* Stephan T. Lavavej
> *Subject:* Proposal: Short Declaration (x := y)
>
>
>
> I was thinking about N3994 and had the following idea.  If this implicit
> auto&& is a good idea for ranged-for-loops, why not use it for other
> declarations as well?
>
>
>
> To start, suppose we said that:
>
>
>
>     x = y;
>
>
>
> where name lookup doesn't find x - isn't ill-formed any longer - but is a
> simple declaration with an implicit auto&&:
>
>
>
>     x = y; // equivalent to:  auto&& x = y;
>
>
>
> One problem with this is that a typo changes the meaning:
>
>
>
>     int f()
>
>     {
>
>         color = 42; // new variable color created
>
>
>
>         ...
>
>
>
>         colour = 43; // oops: new variable colour created, not assignment
> to color variable
>
>
>
>         ...
>
>
>
>         return color; // oops: returns 42 not 43 as intented
>
>     }
>
>
>
> Many scripting languages (like python for example) have this gotcha.
>
>
>
> So my idea would be to instead introduce a := token:
>
>
>
>     x := y; // equivalent to: auto&& x = y;
>
>
>
> Note we have [class.temporary]/5 which says roughly that a temporary in
> most sensible circumstances is life-time extended around a reference to
> which it is bound.
>
>
>
> Anyway, the proposal is fairly simple:
>
>
>
> GRAMMAR
>
>
>
>     simple-declaration:
>
>         short-declaration
>
>         ...
>
>
>
>     short-declaration:
>
>         identifier := initializer;
>
>
>
> WORDING
>
>
>
>     A short-declaration of the form X := Y; is identical (by definition)
> to a simple-declaration auto&& X = Y;
>
>
>
> (TODO: add attributes)
>
>
>
> Thoughts appreciated.
>
>   -Andrew.
>
>
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to std-proposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> Visit this group at
> http://groups.google.com/a/isocpp.org/group/std-proposals/.
>

--

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

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

I like the syntax (same as Go), but I agree that making this a reference by=
 default is confusing. I&#39;d also take the semantics from Go: copying by =
default is safe and unsurprising.<br><br><div>On Mon Jun 02 2014 at 23:59:2=
0, Stephan T. Lavavej &lt;<a href=3D"mailto:stl@exchange.microsoft.com">stl=
@exchange.microsoft.com</a>&gt; wrote:</div>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div lang=3D"EN-US" link=3D"blue" vlink=3D"p=
urple"><div>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;">&gt; If this implicit auto&amp;&amp; is a good idea for =
ranged-for-loops, why not use it for other declarations as well?<u></u><u><=
/u></span></p>

<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;"><u></u>=C2=A0<u></u></span></p>
</div></div><div lang=3D"EN-US" link=3D"blue" vlink=3D"purple"><div><p clas=
s=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot;sans-s=
erif&quot;">Range-for is very special - programmers don&#39;t think of elem=
ents as being separate from their containers/ranges.=C2=A0 Everywhere else,=
 it is vitally important to distinguish value semantics from
 reference semantics.=C2=A0 Note that C++ almost always provides value sema=
ntics by default - for example, that&#39;s what you get when you say auto a=
 =3D b;.<u></u><u></u></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;"><u></u>=C2=A0<u></u></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;">It would be potentially surprising and dangerous if x :=
=3D y created a reference bound to y, instead of a copy of y.=C2=A0 (Danger=
ous, because modifications to x would write through to y.)<u></u><u></u></s=
pan></p>

<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;"><u></u>=C2=A0<u></u></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;">Considered in isolation, dedicated syntax to avoid typo =
problems is an excellent idea.=C2=A0 However, I do not believe that giving =
x :=3D y the semantics of auto&amp;&amp; would be desirable.=C2=A0 Giving i=
t
 the semantics of auto would eliminate that danger/inconsistency and would =
be very slightly less typing, but I do not believe that the benefit would o=
utweigh the cost (of adding yet another feature/syntax to the language).=C2=
=A0 auto is already quite easy to type.<u></u><u></u></span></p>

<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;"><u></u>=C2=A0<u></u></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;">The problem I&#39;m solving in Range-For TNG is that pro=
grammers just say &quot;auto&quot; and don&#39;t think about its implicatio=
ns in the range-for context - and the only real way to solve that is to off=
er
 them an even more convenient lure of less typing.=C2=A0 For ordinary local=
 variables, I do not see any particular problem to solve.<u></u><u></u></sp=
an></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;"><u></u>=C2=A0<u></u></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;">Thanks,<u></u><u></u></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;">STL<u></u><u></u></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;"><u></u>=C2=A0<u></u></span></p>
<p class=3D"MsoNormal"><b><span style=3D"font-size:10.0pt;font-family:&quot=
;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style=3D"font-s=
ize:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> Andrew T=
omazos [mailto:<a href=3D"mailto:andrewtomazos@gmail.com" target=3D"_blank"=
>andrewtomazos@gmail.com</a>]
<br>
<b>Sent:</b> Monday, June 02, 2014 3:56 AM<br>
<b>To:</b> <a href=3D"mailto:std-proposals@isocpp.org" target=3D"_blank">st=
d-proposals@isocpp.org</a><br>
<b>Cc:</b> Stephan T. Lavavej<br>
<b>Subject:</b> Proposal: Short Declaration (x :=3D y)<u></u><u></u></span>=
</p></div></div><div lang=3D"EN-US" link=3D"blue" vlink=3D"purple"><div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
<div>
<p class=3D"MsoNormal">I was thinking about N3994 and had the following ide=
a. =C2=A0If this implicit auto&amp;&amp; is a good idea for ranged-for-loop=
s, why not use it for other declarations as well?<u></u><u></u></p>
<div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">To start, suppose we said that:<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 =C2=A0 x =3D y;<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">where name lookup doesn&#39;t find x - isn&#39;t ill=
-formed any longer - but is a simple declaration with an implicit auto&amp;=
&amp;:<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 =C2=A0 x =3D y; // equivalent to: =C2=A0auto&=
amp;&amp; x =3D y;<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">One problem with this is that a typo changes the mea=
ning:<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 =C2=A0 int f()<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 =C2=A0 {<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 =C2=A0 =C2=A0 =C2=A0 color =3D 42; // new var=
iable color created<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 =C2=A0 =C2=A0 =C2=A0 ...<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 =C2=A0 =C2=A0 =C2=A0 colour =3D 43; // oops: =
new variable colour created, not assignment to color variable<u></u><u></u>=
</p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 =C2=A0 =C2=A0 =C2=A0 ...<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 =C2=A0 =C2=A0 =C2=A0 return color; // oops: r=
eturns 42 not 43 as intented=C2=A0<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 =C2=A0 }<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">Many scripting languages (like python for example) h=
ave this gotcha.<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">So my idea would be to instead introduce a :=3D toke=
n:=C2=A0<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 =C2=A0 x :=3D y;=C2=A0// equivalent to:=C2=A0=
auto&amp;&amp; x =3D y;<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">Note we have [class.temporary]/5 which says roughly =
that a temporary in most sensible circumstances is life-time extended aroun=
d a reference to which it is bound.<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">Anyway, the proposal is fairly simple:<u></u><u></u>=
</p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">GRAMMAR<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 =C2=A0=C2=A0simple-declaration:<u></u><u></u>=
</p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 =C2=A0 =C2=A0 =C2=A0 short-declaration<u></u>=
<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 =C2=A0 =C2=A0 =C2=A0 ...<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 =C2=A0 short-declaration:<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 =C2=A0 =C2=A0 =C2=A0 identifier :=3D=C2=A0ini=
tializer;<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">WORDING<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 =C2=A0 A short-declaration of the form X :=3D=
 Y; is identical (by definition) to a simple-declaration auto&amp;&amp; X =
=3D Y;<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">(TODO: add attributes)<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">Thoughts appreciated.<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 -Andrew.<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
</div>
</div>
</div></div>


<p></p>

-- <br>
<br>
--- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <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>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</blockquote>

<p></p>

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

--bcaec54865d8061e6004fae18d99--

.


Author: Andrew Tomazos <andrewtomazos@gmail.com>
Date: Tue, 3 Jun 2014 00:20:33 +0200
Raw View
--001a11c32628c8318204fae1cd56
Content-Type: text/plain; charset=UTF-8

On Mon, Jun 2, 2014 at 11:59 PM, Stephan T. Lavavej <
stl@exchange.microsoft.com> wrote:

>  > If this implicit auto&& is a good idea for ranged-for-loops, why not
> use it for other declarations as well?
>
>
>
> Range-for is very special - programmers don't think of elements as being
> separate from their containers/ranges.  Everywhere else, it is vitally
> important to distinguish value semantics from reference semantics.  Note
> that C++ almost always provides value semantics by default - for example,
> that's what you get when you say auto a = b;.
>
>
Yes, you're right.  There is nothing in x := y to hint that x is a
reference.  Consequently:

    x := 42;
    y := x;
    y++;
    return x; // surprise: returns 43

And I agree saving typing auto is not as significant as saving typing
auto&&.

Another thought I had when reading N3994 was the const issue.  Iterating
const over a non-const container.  I then saw it dealt with briefly in the
FAQ.  I would argue that:

    for (const x : C)
        ...

is the best syntax for it as you can view it is as a silent "auto&" that is
dropped.  I wondered to myself why it wasn't included in the proposal.
 Many people for safety use an old-style const_iterator loop or the newer
const auto& ranged-for this scenario, so it would seem to be appropriate
and consistent to add this as well.

Thanks,
Andrew.

--

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

--001a11c32628c8318204fae1cd56
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, Jun 2, 2014 at 11:59 PM, Stephan T. Lavavej <span dir=3D"ltr">&lt;<a hr=
ef=3D"mailto:stl@exchange.microsoft.com" target=3D"_blank">stl@exchange.mic=
rosoft.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">





<div lang=3D"EN-US" link=3D"blue" vlink=3D"purple">
<div><div class=3D"">
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;">&gt; If this implicit auto&amp;&amp; is a good idea for =
ranged-for-loops, why not use it for other declarations as well?<u></u><u><=
/u></span></p>

<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;"><u></u>=C2=A0<u></u></span></p>
</div><p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;=
,&quot;sans-serif&quot;">Range-for is very special - programmers don&#39;t =
think of elements as being separate from their containers/ranges.=C2=A0 Eve=
rywhere else, it is vitally important to distinguish value semantics from
 reference semantics.=C2=A0 Note that C++ almost always provides value sema=
ntics by default - for example, that&#39;s what you get when you say auto a=
 =3D b;.<u></u><u></u></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;"><u></u></span></p></div></div></blockquote><div><br></di=
v><div>Yes, you&#39;re right. =C2=A0There is nothing in x :=3D y to hint th=
at x is a reference. =C2=A0Consequently:</div>
<div><br></div><div>=C2=A0 =C2=A0 x :=3D 42;</div><div>=C2=A0 =C2=A0 y :=3D=
 x;</div><div>=C2=A0 =C2=A0 y++;</div><div>=C2=A0 =C2=A0 return x; // surpr=
ise: returns 43</div><div><br></div><div>And I agree saving typing auto is =
not as significant as saving typing auto&amp;&amp;.</div>
<div><br></div><div>Another thought I had when reading N3994 was the const =
issue. =C2=A0Iterating const over a non-const container. =C2=A0I then saw i=
t dealt with briefly in the FAQ. =C2=A0I would argue that:</div><div><br></=
div><div>=C2=A0 =C2=A0 for (const x : C)</div>
<div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 ...</div><div><br></div><div>is the best s=
yntax for it as you can view it is as a silent &quot;auto&amp;&quot; that i=
s dropped. =C2=A0I wondered to myself why it wasn&#39;t included in the pro=
posal. =C2=A0Many people for safety use an old-style const_iterator loop or=
 the newer const auto&amp; ranged-for this scenario, so it would seem to be=
 appropriate and consistent to add this as well.</div>
<div><br></div><div>Thanks,</div><div>Andrew.</div><div><br></div><div><br>=
</div></div></div></div>

<p></p>

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

--001a11c32628c8318204fae1cd56--

.


Author: Matthew Woehlke <mw_triad@users.sourceforge.net>
Date: Mon, 02 Jun 2014 18:25:00 -0400
Raw View
On 2014-06-02 17:59, Stephan T. Lavavej wrote:
> It would be potentially surprising and dangerous if x := y created a
> reference bound to y, instead of a copy of y. (Dangerous, because
> modifications to x would write through to y.)

Indeed, this is one of the things that occasionally drives me nuts about
Python :-).

> The problem I'm solving in Range-For TNG is that programmers just say
> "auto" and don't think about its implications in the range-for
> context - and the only real way to solve that is to offer them an
> even more convenient lure of less typing. For ordinary local
> variables, I do not see any particular problem to solve.

Sorry for the OT, but remind me, does 'for(x : list)' let me write back
changes to 'list'? If "yes", could we also support e.g. 'for(x : const
list)' or 'for(const x : list)' to mean 'auto const& x' rather than
'auto& x'?

--
Matthew

--

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

.


Author: "Stephan T. Lavavej" <stl@exchange.microsoft.com>
Date: Mon, 2 Jun 2014 22:47:58 +0000
Raw View
--_000_78ac163a11744fa4a7cf7cc3c4d93764BN1PR03MB123namprd03pro_
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

> And I agree saving typing auto is not as significant as saving typing aut=
o&&.

Also:

There's an unavoidable hurdle where programmers have to learn that auto dec=
ays references and cv-qualifiers.  (Aside from an IDE displaying the deduce=
d type, I don't see any way to avoid the initial confusion, and this behavi=
or is definitely desirable.)  After that is learned, "auto x =3D y;" serves=
 as a visual reminder that a copy is being made just like with "int x =3D y=
;".  So while "auto" is a bit more typing than ":=3D", the extra typing doe=
s serve a purpose.

> I wondered to myself why it wasn't included in the proposal.

I wanted to keep the proposal small and focused - adding more stuff could p=
ut the whole proposal at risk of being rejected for being too complicated/i=
nvasive/novel.  Range-For TNG's "for (elem : range)" is doing something tha=
t's fairly complicated (as the prvalue and auto&&/decltype(auto) analysis i=
ndicates), is adding a new mechanism for control flow which should not be d=
one lightly, and is allowing "elem" to be declared without specifying a typ=
e (which is nearly without precedent in C++).  My papers and their Q&As con=
sist of arguments as to why this complexity/etc. is worth it.  Adding more =
complexity would require more justification and would be more for readers t=
o digest.

If the EWG approves of Range-For TNG again in Rapperswil, and furthermore i=
ndicates that they'd like convenient syntax for const-observation, then I a=
m definitely willing to write a separate proposal for that.

I will definitely not be proposing any way to make reverse iteration more c=
onvenient.  The line must be drawn there.  :->

Thanks,
STL

From: Andrew Tomazos [mailto:andrewtomazos@gmail.com]
Sent: Monday, June 02, 2014 3:21 PM
To: Stephan T. Lavavej
Cc: std-proposals@isocpp.org
Subject: Re: Proposal: Short Declaration (x :=3D y)

On Mon, Jun 2, 2014 at 11:59 PM, Stephan T. Lavavej <stl@exchange.microsoft=
..com<mailto:stl@exchange.microsoft.com>> wrote:
> If this implicit auto&& is a good idea for ranged-for-loops, why not use =
it for other declarations as well?

Range-for is very special - programmers don't think of elements as being se=
parate from their containers/ranges.  Everywhere else, it is vitally import=
ant to distinguish value semantics from reference semantics.  Note that C++=
 almost always provides value semantics by default - for example, that's wh=
at you get when you say auto a =3D b;.

Yes, you're right.  There is nothing in x :=3D y to hint that x is a refere=
nce.  Consequently:

    x :=3D 42;
    y :=3D x;
    y++;
    return x; // surprise: returns 43

And I agree saving typing auto is not as significant as saving typing auto&=
&.

Another thought I had when reading N3994 was the const issue.  Iterating co=
nst over a non-const container.  I then saw it dealt with briefly in the FA=
Q.  I would argue that:

    for (const x : C)
        ...

is the best syntax for it as you can view it is as a silent "auto&" that is=
 dropped.  I wondered to myself why it wasn't included in the proposal.  Ma=
ny people for safety use an old-style const_iterator loop or the newer cons=
t auto& ranged-for this scenario, so it would seem to be appropriate and co=
nsistent to add this as well.

Thanks,
Andrew.


--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

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

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8">
<meta name=3D"Generator" content=3D"Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
 {font-family:Calibri;
 panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
 {font-family:Tahoma;
 panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
 {font-family:Verdana;
 panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
 {margin:0in;
 margin-bottom:.0001pt;
 font-size:12.0pt;
 font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
 {mso-style-priority:99;
 color:blue;
 text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
 {mso-style-priority:99;
 color:purple;
 text-decoration:underline;}
span.EmailStyle17
 {mso-style-type:personal-reply;
 font-family:"Verdana","sans-serif";
 color:windowtext;}
..MsoChpDefault
 {mso-style-type:export-only;
 font-family:"Calibri","sans-serif";}
@page WordSection1
 {size:8.5in 11.0in;
 margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
 {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-US" link=3D"blue" vlink=3D"purple">
<div class=3D"WordSection1">
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;">&gt; And I agree saving typing auto is not as significan=
t as saving typing auto&amp;&amp;.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;">Also:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;">There's an unavoidable hurdle where programmers have to =
learn that auto decays references and cv-qualifiers.&nbsp; (Aside from an I=
DE displaying the deduced type, I don't see any way to avoid
 the initial confusion, and this behavior is definitely desirable.)&nbsp; A=
fter that is learned, &quot;auto x =3D y;&quot; serves as a visual reminder=
 that a copy is being made just like with &quot;int x =3D y;&quot;.&nbsp; S=
o while &quot;auto&quot; is a bit more typing than &quot;:=3D&quot;, the ex=
tra typing does
 serve a purpose.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;">&gt; I wondered to myself why it wasn't included in the =
proposal.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;">I wanted to keep the proposal small and focused - adding=
 more stuff could put the whole proposal at risk of being rejected for bein=
g too complicated/invasive/novel.&nbsp; Range-For TNG's &quot;for
 (elem : range)&quot; is doing something that's fairly complicated (as the =
prvalue and auto&amp;&amp;/decltype(auto) analysis indicates), is adding a =
new mechanism for control flow which should not be done lightly, and is all=
owing &quot;elem&quot; to be declared without specifying
 a type (which is nearly without precedent in C&#43;&#43;).&nbsp; My papers=
 and their Q&amp;As consist of arguments as to why this complexity/etc. is =
worth it.&nbsp; Adding more complexity would require more justification and=
 would be more for readers to digest.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;">If the EWG approves of Range-For TNG again in Rapperswil=
, and furthermore indicates that they'd like convenient syntax for const-ob=
servation, then I am definitely willing to write a separate
 proposal for that.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;">I will definitely not be proposing any way to make rever=
se iteration more convenient.&nbsp; The line must be drawn there.&nbsp; :-&=
gt;<i><o:p></o:p></i></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;">Thanks,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;">STL<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><b><span style=3D"font-size:10.0pt;font-family:&quot=
;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style=3D"font-s=
ize:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> Andrew T=
omazos [mailto:andrewtomazos@gmail.com]
<br>
<b>Sent:</b> Monday, June 02, 2014 3:21 PM<br>
<b>To:</b> Stephan T. Lavavej<br>
<b>Cc:</b> std-proposals@isocpp.org<br>
<b>Subject:</b> Re: Proposal: Short Declaration (x :=3D y)<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<div>
<div>
<p class=3D"MsoNormal">On Mon, Jun 2, 2014 at 11:59 PM, Stephan T. Lavavej =
&lt;<a href=3D"mailto:stl@exchange.microsoft.com" target=3D"_blank">stl@exc=
hange.microsoft.com</a>&gt; wrote:<o:p></o:p></p>
<div>
<div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-family:&quot;Verdana&quot;,&quot;sans-serif&qu=
ot;">&gt; If this implicit auto&amp;&amp; is a good idea for ranged-for-loo=
ps, why not use it for other declarations as well?</span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-family:&quot;Verdana&quot;,&quot;sans-serif&qu=
ot;">&nbsp;</span><o:p></o:p></p>
</div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-family:&quot;Verdana&quot;,&quot;sans-serif&qu=
ot;">Range-for is very special - programmers don't think of elements as bei=
ng separate from their containers/ranges.&nbsp; Everywhere else,
 it is vitally important to distinguish value semantics from reference sema=
ntics.&nbsp; Note that C&#43;&#43; almost always provides value semantics b=
y default - for example, that's what you get when you say auto a =3D b;.</s=
pan><o:p></o:p></p>
</div>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">Yes, you're right. &nbsp;There is nothing in x :=3D =
y to hint that x is a reference. &nbsp;Consequently:<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; &nbsp; x :=3D 42;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; &nbsp; y :=3D x;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; &nbsp; y&#43;&#43;;<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; &nbsp; return x; // surprise: returns 43<o:p>=
</o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">And I agree saving typing auto is not as significant=
 as saving typing auto&amp;&amp;.<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">Another thought I had when reading N3994 was the con=
st issue. &nbsp;Iterating const over a non-const container. &nbsp;I then sa=
w it dealt with briefly in the FAQ. &nbsp;I would argue that:<o:p></o:p></p=
>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; &nbsp; for (const x : C)<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; &nbsp; &nbsp; &nbsp; ...<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">is the best syntax for it as you can view it is as a=
 silent &quot;auto&amp;&quot; that is dropped. &nbsp;I wondered to myself w=
hy it wasn't included in the proposal. &nbsp;Many people for safety use an =
old-style const_iterator loop or the newer const auto&amp; ranged-for
 this scenario, so it would seem to be appropriate and consistent to add th=
is as well.<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">Thanks,<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal">Andrew.<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

<p></p>

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

--_000_78ac163a11744fa4a7cf7cc3c4d93764BN1PR03MB123namprd03pro_--

.


Author: Andrew Tomazos <andrewtomazos@gmail.com>
Date: Tue, 3 Jun 2014 01:14:00 +0200
Raw View
--089e011609f4e7602504fae28cdc
Content-Type: text/plain; charset=UTF-8

On Tue, Jun 3, 2014 at 12:47 AM, Stephan T. Lavavej <
stl@exchange.microsoft.com> wrote:

>  I will definitely not be proposing any way to make reverse iteration
> more convenient.  The line must be drawn there.  :->
>

Clearly the best syntax for reverse iteration is to simply reverse the
tokens of the statement:

    { ... }
        (range : elem) for;

 *completely straight face*

--

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

--089e011609f4e7602504fae28cdc
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 T=
ue, Jun 3, 2014 at 12:47 AM, Stephan T. Lavavej <span dir=3D"ltr">&lt;<a hr=
ef=3D"mailto:stl@exchange.microsoft.com" target=3D"_blank">stl@exchange.mic=
rosoft.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">





<div lang=3D"EN-US" link=3D"blue" vlink=3D"purple">
<div><div class=3D"">
<p class=3D"MsoNormal"><span style=3D"font-family:Verdana,sans-serif">I wil=
l definitely not be proposing any way to make reverse iteration more conven=
ient.=C2=A0 The line must be drawn there.=C2=A0 :-&gt;</span></p></div></di=
v></div></blockquote>
<div><br></div><div>Clearly the best syntax for reverse iteration is to sim=
ply reverse the tokens of the statement:</div><div><br></div><div>=C2=A0 =
=C2=A0 { ... }</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (range : elem) for;</d=
iv><div><br></div><div>=C2=A0*completely straight face*<br>
</div><div><br></div></div></div></div>

<p></p>

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

--089e011609f4e7602504fae28cdc--

.


Author: "Stephan T. Lavavej" <stl@exchange.microsoft.com>
Date: Mon, 2 Jun 2014 23:25:34 +0000
Raw View
--_000_f1acf6795d494893846a911fe6a13871BN1PR03MB123namprd03pro_
Content-Type: text/plain; charset=UTF-8

I love it!  And do-while provides precedent in this area.  :->

STL

From: Andrew Tomazos [mailto:andrewtomazos@gmail.com]
Sent: Monday, June 02, 2014 4:14 PM
To: Stephan T. Lavavej
Cc: std-proposals@isocpp.org
Subject: Re: Proposal: Short Declaration (x := y)

On Tue, Jun 3, 2014 at 12:47 AM, Stephan T. Lavavej <stl@exchange.microsoft.com<mailto:stl@exchange.microsoft.com>> wrote:
I will definitely not be proposing any way to make reverse iteration more convenient.  The line must be drawn there.  :->

Clearly the best syntax for reverse iteration is to simply reverse the tokens of the statement:

    { ... }
        (range : elem) for;

 *completely straight face*

--

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

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

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8">
<meta name=3D"Generator" content=3D"Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
 {font-family:Calibri;
 panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
 {font-family:Tahoma;
 panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
 {font-family:Verdana;
 panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
 {margin:0in;
 margin-bottom:.0001pt;
 font-size:12.0pt;
 font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
 {mso-style-priority:99;
 color:blue;
 text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
 {mso-style-priority:99;
 color:purple;
 text-decoration:underline;}
span.EmailStyle17
 {mso-style-type:personal-reply;
 font-family:"Verdana","sans-serif";
 color:windowtext;}
..MsoChpDefault
 {mso-style-type:export-only;
 font-family:"Calibri","sans-serif";}
@page WordSection1
 {size:8.5in 11.0in;
 margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
 {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-US" link=3D"blue" vlink=3D"purple">
<div class=3D"WordSection1">
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;">I love it!&nbsp; And do-while provides precedent in this=
 area.&nbsp; :-&gt;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;">STL<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,&quot=
;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><b><span style=3D"font-size:10.0pt;font-family:&quot=
;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style=3D"font-s=
ize:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> Andrew T=
omazos [mailto:andrewtomazos@gmail.com]
<br>
<b>Sent:</b> Monday, June 02, 2014 4:14 PM<br>
<b>To:</b> Stephan T. Lavavej<br>
<b>Cc:</b> std-proposals@isocpp.org<br>
<b>Subject:</b> Re: Proposal: Short Declaration (x :=3D y)<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<div>
<div>
<p class=3D"MsoNormal">On Tue, Jun 3, 2014 at 12:47 AM, Stephan T. Lavavej =
&lt;<a href=3D"mailto:stl@exchange.microsoft.com" target=3D"_blank">stl@exc=
hange.microsoft.com</a>&gt; wrote:<o:p></o:p></p>
<div>
<div>
<div>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;mso-margin-bottom-a=
lt:auto"><span style=3D"font-family:&quot;Verdana&quot;,&quot;sans-serif&qu=
ot;">I will definitely not be proposing any way to make reverse iteration m=
ore convenient.&nbsp; The line must be drawn there.&nbsp; :-&gt;</span><o:p=
></o:p></p>
</div>
</div>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">Clearly the best syntax for reverse iteration is to =
simply reverse the tokens of the statement:<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; &nbsp; { ... }<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp; &nbsp; &nbsp; &nbsp; (range : elem) for;<o:p>=
</o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class=3D"MsoNormal">&nbsp;*completely straight face*<o:p></o:p></p>
</div>
<div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

<p></p>

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

--_000_f1acf6795d494893846a911fe6a13871BN1PR03MB123namprd03pro_--

.


Author: Tony V E <tvaneerd@gmail.com>
Date: Tue, 3 Jun 2014 10:58:50 -0400
Raw View
--14dae94737f9e414d004faefbfac
Content-Type: text/plain; charset=UTF-8

On Mon, Jun 2, 2014 at 6:25 PM, Matthew Woehlke <
mw_triad@users.sourceforge.net> wrote:


> Sorry for the OT, but remind me, does 'for(x : list)' let me write back
> changes to 'list'? If "yes", could we also support e.g. 'for(x : const
> list)' or 'for(const x : list)' to mean 'auto const& x' rather than
> 'auto& x'?
>
>
for (x : const list) was the first thing that came to my mind.  It would
make x a const_iterator.  I think that would be great.

for(const x : list) would just make x a const iterator, missing out on that
all-important underscore :-(

Tony

--

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

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

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><br><div class=3D"gmail=
_quote">On Mon, Jun 2, 2014 at 6:25 PM, Matthew Woehlke <span dir=3D"ltr">&=
lt;<a href=3D"mailto:mw_triad@users.sourceforge.net" target=3D"_blank">mw_t=
riad@users.sourceforge.net</a>&gt;</span> wrote:<br>
<div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex">Sorry for the OT, but remin=
d me, does &#39;for(x : list)&#39; let me write back<br>
changes to &#39;list&#39;? If &quot;yes&quot;, could we also support e.g. &=
#39;for(x : const<br>
list)&#39; or &#39;for(const x : list)&#39; to mean &#39;auto const&amp; x&=
#39; rather than<br>
&#39;auto&amp; x&#39;?<br>
<span class=3D"HOEnZb"><font color=3D"#888888"><br></font></span></blockquo=
te><div><br></div></div>for (x : const list) was the first thing that came =
to my mind.=C2=A0 It would make x a const_iterator.=C2=A0 I think that woul=
d be great.<br>
</div><div class=3D"gmail_extra"><br>for(const x : list) would just make x =
a const iterator, missing out on that all-important underscore :-(<br><br><=
/div><div class=3D"gmail_extra">Tony<br></div></div>

<p></p>

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

--14dae94737f9e414d004faefbfac--

.


Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Tue, 3 Jun 2014 18:03:32 +0300
Raw View
On 3 June 2014 17:58, Tony V E <tvaneerd@gmail.com> wrote:
>> Sorry for the OT, but remind me, does 'for(x : list)' let me write back
>> changes to 'list'? If "yes", could we also support e.g. 'for(x : const
>> list)' or 'for(const x : list)' to mean 'auto const& x' rather than
>> 'auto& x'?
> for (x : const list) was the first thing that came to my mind.  It would
> make x a const_iterator.  I think that would be great.
>
> for(const x : list) would just make x a const iterator, missing out on that
> all-important underscore :-(


That would be a rather funny way to specify for (const x : list), since x is
not an iterator of any kind in a range-for loop.

--

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

.


Author: Tony V E <tvaneerd@gmail.com>
Date: Tue, 3 Jun 2014 11:23:56 -0400
Raw View
--089e0141a9aaa8908c04faf01995
Content-Type: text/plain; charset=UTF-8

On Tue, Jun 3, 2014 at 11:03 AM, Ville Voutilainen <
ville.voutilainen@gmail.com> wrote:

> On 3 June 2014 17:58, Tony V E <tvaneerd@gmail.com> wrote:
> >> Sorry for the OT, but remind me, does 'for(x : list)' let me write back
> >> changes to 'list'? If "yes", could we also support e.g. 'for(x : const
> >> list)' or 'for(const x : list)' to mean 'auto const& x' rather than
> >> 'auto& x'?
> > for (x : const list) was the first thing that came to my mind.  It would
> > make x a const_iterator.  I think that would be great.
> >
> > for(const x : list) would just make x a const iterator, missing out on
> that
> > all-important underscore :-(
>
>
> That would be a rather funny way to specify for (const x : list), since x
> is
> not an iterator of any kind in a range-for loop.
>
>
grrr. right.  I wish I could actually use C++11 daily, instead of just
playing one on TV.

Tony

--

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

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

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><br><div class=3D"gmail=
_quote">On Tue, Jun 3, 2014 at 11:03 AM, Ville Voutilainen <span dir=3D"ltr=
">&lt;<a href=3D"mailto:ville.voutilainen@gmail.com" target=3D"_blank">vill=
e.voutilainen@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div class=3D"">On 3 June 2014 17:58, Tony V=
 E &lt;<a href=3D"mailto:tvaneerd@gmail.com">tvaneerd@gmail.com</a>&gt; wro=
te:<br>

&gt;&gt; Sorry for the OT, but remind me, does &#39;for(x : list)&#39; let =
me write back<br>
&gt;&gt; changes to &#39;list&#39;? If &quot;yes&quot;, could we also suppo=
rt e.g. &#39;for(x : const<br>
&gt;&gt; list)&#39; or &#39;for(const x : list)&#39; to mean &#39;auto cons=
t&amp; x&#39; rather than<br>
&gt;&gt; &#39;auto&amp; x&#39;?<br>
&gt; for (x : const list) was the first thing that came to my mind. =C2=A0I=
t would<br>
&gt; make x a const_iterator. =C2=A0I think that would be great.<br>
&gt;<br>
&gt; for(const x : list) would just make x a const iterator, missing out on=
 that<br>
&gt; all-important underscore :-(<br>
<br>
<br>
</div>That would be a rather funny way to specify for (const x : list), sin=
ce x is<br>
not an iterator of any kind in a range-for loop.<br>
<div class=3D"HOEnZb"><div class=3D"h5"><br></div></div></blockquote><div><=
br></div></div>grrr. right.=C2=A0 I wish I could actually use C++11 daily, =
instead of just playing one on TV.<br><br></div><div class=3D"gmail_extra">=
Tony<br>
<br></div></div>

<p></p>

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

--089e0141a9aaa8908c04faf01995--

.


Author: Matthew Woehlke <mw_triad@users.sourceforge.net>
Date: Tue, 03 Jun 2014 11:42:32 -0400
Raw View
On 2014-06-02 18:20, Andrew Tomazos wrote:
> Another thought I had when reading N3994 was the const issue.  Iterating
> const over a non-const container.  I then saw it dealt with briefly in the
> FAQ.  I would argue that:
>
>     for (const x : C)
>         ...
>
> is the best syntax for it as you can view it is as a silent "auto&" that is
> dropped.  I wondered to myself why it wasn't included in the proposal.
>  Many people for safety use an old-style const_iterator loop or the newer
> const auto& ranged-for this scenario, so it would seem to be appropriate
> and consistent to add this as well.

As Tony pointed out, 'for (x : const list)' has the advantage of telling
the compiler that the actual iteration should use const_iterators, which
is potentially a significant optimization, especially if taking a
mutable iterator has a performance penalty (e.g. invoking
copy-on-write). That being the case, there is some potential for that to
be an orthogonal proposal. (In fact, correct me if I'm wrong, but the
type of x in 'auto&& x = *iter' where '*iter' returns a 'const& T' is
also 'const& T', yes? Or does that end up making a copy?)

Having said all that, am I also correct that:

  auto const& const_list = list;
  for (auto&& x : list)

....already has the desired behavior?

--
Matthew

--

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

.


Author: Jim Porter <jvp4846@g.rit.edu>
Date: Tue, 3 Jun 2014 09:56:56 -0700 (PDT)
Raw View
------=_Part_285_26535661.1401814617199
Content-Type: text/plain; charset=UTF-8

On Tuesday, June 3, 2014 9:58:53 AM UTC-5, Tony V E wrote:
>
> for (x : const list) was the first thing that came to my mind.  It would
> make x a const_iterator.  I think that would be great.
>

I don't know if I have an opinion on this syntax in general yet (modulo the
fact that x would be the result of const_iterator::operator*()), but I
think it would be strange for "const list" to be usable *only* in a
range-for loop. If "const list" means something like
const_cast<std::add_const<decltype(list)>>(list), then I'd expect to be
able to use that anywhere, like calling a function, e.g. my_function(const
list). The benefits of making list be const are the same in this situation
as in a range-for loop, although this situation is probably quite a bit
more difficult on the parser.

Still, I'd expect that "const list" works everywhere or nowhere. If that
can't work, then maybe for(const x : list) is better, since the left-hand
side of that expression is already a bit magical.

- Jim

--

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

------=_Part_285_26535661.1401814617199
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Tuesday, June 3, 2014 9:58:53 AM UTC-5, Tony V E wrote:=
<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;bor=
der-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><div>for (x :=
 const list) was the first thing that came to my mind.&nbsp; It would make =
x a const_iterator.&nbsp; I think that would be great.</div></div></blockqu=
ote><div><br>I don't know if I have an opinion on this syntax in general ye=
t (modulo the fact that x would be the result of const_iterator::operator*(=
)), but I think it would be strange for "const list" to be usable *only* in=
 a range-for loop. If "const list" means something like const_cast&lt;std::=
add_const&lt;decltype(list)&gt;&gt;(list), then I'd expect to be able to us=
e that anywhere, like calling a function, e.g. my_function(const list). The=
 benefits of making list be const are the same in this situation as in a ra=
nge-for loop, although this situation is probably quite a bit more difficul=
t on the parser.<br><br>Still, I'd expect that "const list" works everywher=
e or nowhere. If that can't work, then maybe for(const x : list) is better,=
 since the left-hand side of that expression is already a bit magical.<br><=
br>- Jim<br></div></div>

<p></p>

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

------=_Part_285_26535661.1401814617199--

.


Author: =?UTF-8?Q?David_Rodr=C3=ADguez_Ibeas?= <dibeas@ieee.org>
Date: Tue, 3 Jun 2014 13:40:53 -0400
Raw View
--001a11c1243c7404c604faf20335
Content-Type: text/plain; charset=UTF-8

Uhm... would this not work?

for (auto && x : std::cref(container))

Probably not, but it could be made to work by providing begin() and end()
overloads that take reference_wrapper and forward to the nested object
(possibly detecting with SFINAE if 'begin(nested)' and 'end(nested)' is
well formed. I would have to think about it, but it seems like a simple
library-only solution to the problem.

   David


On Tue, Jun 3, 2014 at 12:56 PM, Jim Porter <jvp4846@g.rit.edu> wrote:

> On Tuesday, June 3, 2014 9:58:53 AM UTC-5, Tony V E wrote:
>>
>> for (x : const list) was the first thing that came to my mind.  It would
>> make x a const_iterator.  I think that would be great.
>>
>
> I don't know if I have an opinion on this syntax in general yet (modulo
> the fact that x would be the result of const_iterator::operator*()), but I
> think it would be strange for "const list" to be usable *only* in a
> range-for loop. If "const list" means something like
> const_cast<std::add_const<decltype(list)>>(list), then I'd expect to be
> able to use that anywhere, like calling a function, e.g. my_function(const
> list). The benefits of making list be const are the same in this situation
> as in a range-for loop, although this situation is probably quite a bit
> more difficult on the parser.
>
> Still, I'd expect that "const list" works everywhere or nowhere. If that
> can't work, then maybe for(const x : list) is better, since the left-hand
> side of that expression is already a bit magical.
>
> - Jim
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to std-proposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> Visit this group at
> http://groups.google.com/a/isocpp.org/group/std-proposals/.
>

--

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

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

<div dir=3D"ltr">Uhm... would this not work?=C2=A0<br><br>for (auto &amp;&a=
mp; x : std::cref(container))=C2=A0<br><br>Probably not, but it could be ma=
de to work by providing begin() and end() overloads that take reference_wra=
pper and forward to the nested object (possibly detecting with SFINAE if &#=
39;begin(nested)&#39; and &#39;end(nested)&#39; is well formed. I would hav=
e to think about it, but it seems like a simple library-only solution to th=
e problem.<br>
<br>=C2=A0 =C2=A0David<br><div class=3D"gmail_extra"><br><br><div class=3D"=
gmail_quote">On Tue, Jun 3, 2014 at 12:56 PM, Jim Porter <span dir=3D"ltr">=
&lt;<a href=3D"mailto:jvp4846@g.rit.edu" target=3D"_blank">jvp4846@g.rit.ed=
u</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;p=
adding-left:1ex"><div dir=3D"ltr"><div class=3D"">On Tuesday, June 3, 2014 =
9:58:53 AM UTC-5, Tony V E wrote:<blockquote class=3D"gmail_quote" style=3D=
"margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,2=
04,204);border-left-style:solid;padding-left:1ex">
<div dir=3D"ltr"><div>for (x : const list) was the first thing that came to=
 my mind.=C2=A0 It would make x a const_iterator.=C2=A0 I think that would =
be great.</div></div></blockquote></div><div><br>I don&#39;t know if I have=
 an opinion on this syntax in general yet (modulo the fact that x would be =
the result of const_iterator::operator*()), but I think it would be strange=
 for &quot;const list&quot; to be usable *only* in a range-for loop. If &qu=
ot;const list&quot; means something like const_cast&lt;std::add_const&lt;de=
cltype(list)&gt;&gt;(list), then I&#39;d expect to be able to use that anyw=
here, like calling a function, e.g. my_function(const list). The benefits o=
f making list be const are the same in this situation as in a range-for loo=
p, although this situation is probably quite a bit more difficult on the pa=
rser.<br>
<br>Still, I&#39;d expect that &quot;const list&quot; works everywhere or n=
owhere. If that can&#39;t work, then maybe for(const x : list) is better, s=
ince the left-hand side of that expression is already a bit magical.<span c=
lass=3D""><font color=3D"#888888"><br>
<br>- Jim<br></font></span></div></div><div class=3D""><div class=3D"h5">

<p></p>

-- <br>
<br>
--- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <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>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><br></div></div>

<p></p>

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

--001a11c1243c7404c604faf20335--

.


Author: Jim Porter <jvp4846@g.rit.edu>
Date: Tue, 3 Jun 2014 11:19:58 -0700 (PDT)
Raw View
------=_Part_262_32993689.1401819598800
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Tuesday, June 3, 2014 12:40:55 PM UTC-5, David Rodr=C3=ADguez Ibeas wrot=
e:
>
> Uhm... would this not work?=20
>
> for (auto && x : std::cref(container))=20
>
> Probably not, but it could be made to work by providing begin() and end()=
=20
> overloads that take reference_wrapper and forward to the nested object=20
> (possibly detecting with SFINAE if 'begin(nested)' and 'end(nested)' is=
=20
> well formed. I would have to think about it, but it seems like a simple=
=20
> library-only solution to the problem.
>

Good idea! It works with the appropriate overloads for std::begin() and=20
std::end(): <http://ideone.com/wdzgPI>. This certainly seems like something=
=20
sensible to add to the standard, since it's simple to implement without any=
=20
language changes, the resulting syntax is fairly nice, and would be pretty=
=20
useful for const-correctness.

- Jim=20

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

------=_Part_262_32993689.1401819598800
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Tuesday, June 3, 2014 12:40:55 PM UTC-5, David Rodr=C3=
=ADguez Ibeas wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;ma=
rgin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=
=3D"ltr">Uhm... would this not work?&nbsp;<br><br>for (auto &amp;&amp; x : =
std::cref(container))&nbsp;<br><br>Probably not, but it could be made to wo=
rk by providing begin() and end() overloads that take reference_wrapper and=
 forward to the nested object (possibly detecting with SFINAE if 'begin(nes=
ted)' and 'end(nested)' is well formed. I would have to think about it, but=
 it seems like a simple library-only solution to the problem.<br></div></bl=
ockquote><div><br>Good idea! It works with the appropriate overloads for st=
d::begin() and std::end(): &lt;http://ideone.com/wdzgPI&gt;. This certainly=
 seems like something sensible to add to the standard, since it's simple to=
 implement without any language changes, the resulting syntax is fairly nic=
e, and would be pretty useful for const-correctness.<br><br>- Jim <br></div=
></div>

<p></p>

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

------=_Part_262_32993689.1401819598800--

.


Author: Matthew Woehlke <mw_triad@users.sourceforge.net>
Date: Tue, 03 Jun 2014 15:15:53 -0400
Raw View
On 2014-06-03 12:56, Jim Porter wrote:
> On Tuesday, June 3, 2014 9:58:53 AM UTC-5, Tony V E wrote:
>> for (x : const list) was the first thing that came to my mind.  It would
>> make x a const_iterator.  I think that would be great.
>
> I don't know if I have an opinion on this syntax in general yet (modulo the
> fact that x would be the result of const_iterator::operator*()), but I
> think it would be strange for "const list" to be usable *only* in a
> range-for loop. If "const list" means something like
> const_cast<std::add_const<decltype(list)>>(list), then I'd expect to be
> able to use that anywhere, like calling a function, e.g. my_function(const
> list). The benefits of making list be const are the same in this situation
> as in a range-for loop, although this situation is probably quite a bit
> more difficult on the parser.

That's a good point, and in fact I really like the idea. I agree, the
parsing side could be a little tricky, but the implementation should be
straight forward (basically you're just making 'const' something that
may or may not have been 'const' previously).

As something of a compromise, if parsing would be *really* hard, we
could possibly allow 'const<expr>' to mean (as per your above example)
'const_cast<std::add_const<decltype(expr)>>(expr)'.

--
Matthew

--

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

.


Author: =?UTF-8?Q?David_Rodr=C3=ADguez_Ibeas?= <dibeas@ieee.org>
Date: Wed, 4 Jun 2014 15:29:14 -0400
Raw View
--047d7bdc96c8c6ddd404fb07a4dd
Content-Type: text/plain; charset=UTF-8

On Tue, Jun 3, 2014 at 3:15 PM, Matthew Woehlke <
mw_triad@users.sourceforge.net> wrote:

> As something of a compromise, if parsing would be *really* hard, we
> could possibly allow 'const<expr>' to mean (as per your above example)
> 'const_cast<std::add_const<decltype(expr)>>(expr)'.
>

It might be a bit more complicated to do at the library level (that
'const_cast' won't work in the general case, as my example using std::cref
will also fail a few cases). The problem being that you cannot const_cast
to a non-reference non-pointer type. That means that the conversion would
have to be reference based, now what do we do with rvalues? [this is where
the suggestion of using std::cref also fails!], we don't want to convert
from an rvalue-expression to an rvalue-reference, as the '__range'
reference (in the expansion of range-based for in the standard) would not
bind to the rvalue, and the object would be destroyed before even entering
the expansion of the for-loop:

i..e in the code:
std::list<int> get_me_a_list();
for (auto && x : const get_me_a_list()) {

we would get the expansion:
{
    auto && __range = const_cast<std::list<int> const &>(get_me_a_list());
    for (auto __begin = .... ) { // the temporary has already died!!

The problem with the alternative:

for (auto && x : std::cref(get_me_a_list())) {

is that 'std::cref' is explicitly deleted for rvalue-reference arguments
for precisely this reason.

--

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

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

<div dir=3D"ltr"><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">=
On Tue, Jun 3, 2014 at 3:15 PM, Matthew Woehlke <span dir=3D"ltr">&lt;<a hr=
ef=3D"mailto:mw_triad@users.sourceforge.net" target=3D"_blank">mw_triad@use=
rs.sourceforge.net</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div class=3D"">As something of a compromise=
, if parsing would be *really* hard, we<br></div>
could possibly allow &#39;const&lt;expr&gt;&#39; to mean (as per your above=
 example)<br>
&#39;const_cast&lt;std::add_const&lt;decltype(expr)&gt;&gt;(expr)&#39;.<br>=
</blockquote><div><br>It might be a bit more complicated to do at the libra=
ry level (that &#39;const_cast&#39; won&#39;t work in the general case, as =
my example using std::cref will also fail a few cases). The problem being t=
hat you cannot const_cast to a non-reference non-pointer type. That means t=
hat the conversion would have to be reference based, now what do we do with=
 rvalues? [this is where the suggestion of using std::cref also fails!], we=
 don&#39;t want to convert from an rvalue-expression to an rvalue-reference=
, as the &#39;__range&#39; reference (in the expansion of range-based for i=
n the standard) would not bind to the rvalue, and the object would be destr=
oyed before even entering the expansion of the for-loop:<br>
<br>i..e in the code:<br>std::list&lt;int&gt; get_me_a_list();<br>for (auto=
 &amp;&amp; x : const get_me_a_list()) {<br><br>we would get the expansion:=
<br>{<br>=C2=A0 =C2=A0 auto &amp;&amp; __range =3D const_cast&lt;std::list&=
lt;int&gt; const &amp;&gt;(get_me_a_list());<br>
=C2=A0 =C2=A0 for (auto __begin =3D .... ) { // the temporary has already d=
ied!!<br><br>The problem with the alternative:<br><br>for (auto &amp;&amp; =
x : std::cref(get_me_a_list())) {<br><br>is that &#39;std::cref&#39; is exp=
licitly deleted for rvalue-reference arguments for precisely this reason.</=
div>
</div></div></div>

<p></p>

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

--047d7bdc96c8c6ddd404fb07a4dd--

.


Author: =?UTF-8?Q?David_Rodr=C3=ADguez_Ibeas?= <dibeas@ieee.org>
Date: Wed, 4 Jun 2014 15:30:21 -0400
Raw View
--089e0160bb6cc8486704fb07a868
Content-Type: text/plain; charset=UTF-8

On Tue, Jun 3, 2014 at 2:19 PM, Jim Porter <jvp4846@g.rit.edu> wrote:

> for (auto && x : std::cref(container))
>>
>> Good idea! It works with the appropriate overloads for std::begin() and
> std::end(): <http://ideone.com/wdzgPI>. This certainly seems like
> something sensible to add to the standard, since it's simple to implement
> without any language changes, the resulting syntax is fairly nice, and
> would be pretty useful for const-correctness.
>
> Except that it does not work when 'container' is an rvalue expression...

--

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

--089e0160bb6cc8486704fb07a868
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 T=
ue, Jun 3, 2014 at 2:19 PM, Jim Porter <span dir=3D"ltr">&lt;<a href=3D"mai=
lto:jvp4846@g.rit.edu" target=3D"_blank">jvp4846@g.rit.edu</a>&gt;</span> w=
rote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div class=3D""><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">for (auto &amp;&amp; x : std::cref(container))=C2=A0<br><b=
r></div></blockquote></div><div>Good idea! It works with the appropriate ov=
erloads for std::begin() and std::end(): &lt;<a href=3D"http://ideone.com/w=
dzgPI" target=3D"_blank">http://ideone.com/wdzgPI</a>&gt;. This certainly s=
eems like something sensible to add to the standard, since it&#39;s simple =
to implement without any language changes, the resulting syntax is fairly n=
ice, and would be pretty useful for const-correctness.<span class=3D"HOEnZb=
"><font color=3D"#888888"><br>
<br></font></span></div></div></blockquote><div>Except that it does not wor=
k when &#39;container&#39; is an rvalue expression...=C2=A0</div></div></di=
v></div>

<p></p>

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

--089e0160bb6cc8486704fb07a868--

.


Author: Jim Porter <jvp4846@g.rit.edu>
Date: Wed, 4 Jun 2014 12:54:37 -0700 (PDT)
Raw View
------=_Part_1521_24018921.1401911677581
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Wednesday, June 4, 2014 2:30:22 PM UTC-5, David Rodr=C3=ADguez Ibeas wro=
te:
>
> On Tue, Jun 3, 2014 at 2:19 PM, Jim Porter <jvp...@g.rit.edu <javascript:=
>
> > wrote:
>
>> for (auto && x : std::cref(container))=20
>>>
>>> Good idea! It works with the appropriate overloads for std::begin() and=
=20
>> std::end(): <http://ideone.com/wdzgPI>. This certainly seems like=20
>> something sensible to add to the standard, since it's simple to implemen=
t=20
>> without any language changes, the resulting syntax is fairly nice, and=
=20
>> would be pretty useful for const-correctness.
>>
>> Except that it does not work when 'container' is an rvalue expression...=
=20
>

Well, it fails to compile, which is ok to me, but obviously not ideal. A=20
syntax like `const(get_me_a_list())` would certainly be more=20
generally-applicable though. I think requiring parens after the `const`=20
would make it grammatically unambiguous, but maybe not...

- Jim

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

------=_Part_1521_24018921.1401911677581
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Wednesday, June 4, 2014 2:30:22 PM UTC-5, David Rodr=C3=
=ADguez Ibeas wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;ma=
rgin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=
=3D"ltr"><div><div class=3D"gmail_quote">On Tue, Jun 3, 2014 at 2:19 PM, Ji=
m Porter <span dir=3D"ltr">&lt;<a href=3D"javascript:" target=3D"_blank" gd=
f-obfuscated-mailto=3D"M-uoWBOKdFUJ" onmousedown=3D"this.href=3D'javascript=
:';return true;" onclick=3D"this.href=3D'javascript:';return true;">jvp...@=
g.rit.edu</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><blockquote class=3D"g=
mail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;=
padding-left:1ex">
<div dir=3D"ltr">for (auto &amp;&amp; x : std::cref(container))&nbsp;<br><b=
r></div></blockquote></div><div>Good idea! It works with the appropriate ov=
erloads for std::begin() and std::end(): &lt;<a href=3D"http://ideone.com/w=
dzgPI" target=3D"_blank" onmousedown=3D"this.href=3D'http://www.google.com/=
url?q\75http%3A%2F%2Fideone.com%2FwdzgPI\46sa\75D\46sntz\0751\46usg\75AFQjC=
NFpwoStAkEXuiGWtTZNqFzy94py6Q';return true;" onclick=3D"this.href=3D'http:/=
/www.google.com/url?q\75http%3A%2F%2Fideone.com%2FwdzgPI\46sa\75D\46sntz\07=
51\46usg\75AFQjCNFpwoStAkEXuiGWtTZNqFzy94py6Q';return true;">http://ideone.=
com/wdzgPI</a>&gt;. This certainly seems like something sensible to add to =
the standard, since it's simple to implement without any language changes, =
the resulting syntax is fairly nice, and would be pretty useful for const-c=
orrectness.<span><font color=3D"#888888"><br>
<br></font></span></div></div></blockquote><div>Except that it does not wor=
k when 'container' is an rvalue expression...&nbsp;</div></div></div></div>=
</blockquote><div><br>Well, it fails to compile, which is ok to me, but obv=
iously not ideal. A syntax like `const(get_me_a_list())` would certainly be=
 more generally-applicable though. I think requiring parens after the `cons=
t` would make it grammatically unambiguous, but maybe not...<br><br>- Jim<b=
r></div></div>

<p></p>

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

------=_Part_1521_24018921.1401911677581--

.