Topic: About the naming of special member functions
Author: btcrtn@gmail.com
Date: Mon, 22 Aug 2016 09:12:07 -0700 (PDT)
Raw View
------=_Part_692_40425615.1471882327305
Content-Type: multipart/alternative;
boundary="----=_Part_693_1058992479.1471882327305"
------=_Part_693_1058992479.1471882327305
Content-Type: text/plain; charset=UTF-8
I apologize if an idea like this has been discussed/rejected before, I have
not found a relevant discussion.
Are there any compelling reasons that retyping the class name should be
required for ctors etc. ?
I propose allowing 'auto' in place of the class name.
template<class T>
class SomeLongClassName {
public:
// Short and readable
auto& operator = (const auto& other) {/*...*/}
};
SomeLongClassName<long long double> a;
a.~auto(); // Nice and short
// Allows for special member functions in anonymous classes
class {
auto() {/*...*/}
auto& operator = (auto&& other) {/*...*/}
~auto() {/*...*/}
};
Since I have zero experience with proposals, I would just like to know if a
change like this could be benefitial, or is complete nonsense.
Kind regards,
Patrick
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/50f0a867-a913-444f-aca3-0f18861c0d18%40isocpp.org.
------=_Part_693_1058992479.1471882327305
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">I apologize if an idea like this has been discussed/reject=
ed before, I have not found a relevant discussion.<br>Are there any compell=
ing reasons that retyping the class name should be required for ctors etc. =
?<br><br>I propose allowing '<span style=3D"font-family: courier new,mo=
nospace;">auto</span>' in place of the class name.<br><br><div class=3D=
"prettyprint" style=3D"background-color: rgb(250, 250, 250); border-color: =
rgb(187, 187, 187); border-style: solid; border-width: 1px; word-wrap: brea=
k-word;"><code class=3D"prettyprint"><div class=3D"subprettyprint"><span st=
yle=3D"color: #008;" class=3D"styled-by-prettify">template</span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify"><</span><span style=3D"c=
olor: #008;" class=3D"styled-by-prettify">class</span><span style=3D"color:=
#000;" class=3D"styled-by-prettify"> T</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">></span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"><br></span><span style=3D"color: #008;" class=3D"st=
yled-by-prettify">class</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> </span><span style=3D"color: #606;" class=3D"styled-by-pretti=
fy">SomeLongClassName</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">{</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></s=
pan><span style=3D"color: #008;" class=3D"styled-by-prettify">public</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">:</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><=
span style=3D"color: #800;" class=3D"styled-by-prettify">// Short and reada=
ble</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=
=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-prettify"=
>auto</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><s=
pan style=3D"color: #008;" class=3D"styled-by-prettify">operator</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">(</span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">const</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-=
prettify">auto</span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">&</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
other</span><span style=3D"color: #660;" class=3D"styled-by-prettify">)</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span =
style=3D"color: #660;" class=3D"styled-by-prettify">{</span><span style=3D"=
color: #800;" class=3D"styled-by-prettify">/*...*/</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">}</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"><br></span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">};</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"><br><br></span><span style=3D"color: #606;" class=3D"style=
d-by-prettify">SomeLongClassName</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify"><</span><span style=3D"color: #008;" class=3D"st=
yled-by-prettify">long</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettif=
y">long</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </=
span><span style=3D"color: #008;" class=3D"styled-by-prettify">double</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">></span><span=
style=3D"color: #000;" class=3D"styled-by-prettify"> a</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">;</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"><br>a</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">.~</span><span style=3D"color: #008;" clas=
s=3D"styled-by-prettify">auto</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">();</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"> </span><span style=3D"color: #800;" class=3D"styled-by-prettif=
y">// Nice and short</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"><br><br></span><span style=3D"color: #800;" class=3D"styled-by-pr=
ettify">// Allows for special member functions in anonymous classes</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span s=
tyle=3D"color: #008;" class=3D"styled-by-prettify">class</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">{</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"color:=
#008;" class=3D"styled-by-prettify">auto</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">()</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">{</span><span style=3D"color: #800;" class=3D"styled-by-pret=
tify">/*...*/</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">}</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=
=C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">auto</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&a=
mp;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
><span style=3D"color: #008;" class=3D"styled-by-prettify">operator</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">(</span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">auto</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">&&</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> other</span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">)</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">{</s=
pan><span style=3D"color: #800;" class=3D"styled-by-prettify">/*...*/</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">}</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">~</span><span sty=
le=3D"color: #008;" class=3D"styled-by-prettify">auto</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">()</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">{</span><span style=3D"color: #800;" class=3D"sty=
led-by-prettify">/*...*/</span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">}</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"><br></span><span style=3D"color: #660;" class=3D"styled-by-prettify">}=
;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></spa=
n></div></code></div><br>Since I have zero experience with proposals, I wou=
ld just like to know if a change like this could be benefitial, or is compl=
ete nonsense.<br><br>Kind regards,<br>Patrick<br></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/50f0a867-a913-444f-aca3-0f18861c0d18%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/50f0a867-a913-444f-aca3-0f18861c0d18=
%40isocpp.org</a>.<br />
------=_Part_693_1058992479.1471882327305--
------=_Part_692_40425615.1471882327305--
.
Author: "D. B." <db0451@gmail.com>
Date: Mon, 22 Aug 2016 17:15:49 +0100
Raw View
--047d7bf0dbf093fc5d053aab5c0d
Content-Type: text/plain; charset=UTF-8
The example of operator& wouldn't work because (though it's not
recommended) one can return any type from it, in which case auto & would
perform type deduction, not 'use my own class name'. Same goes for most of
the other operators.
So at a minimum, a different keyword would be needed for this. I don't
think there are any lying around that can be repurposed, so it'd probably
require a new one.
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhGW5Bj1JRi%3Dy8AHeVOc_96MTRPQtH8%2B07Uh8OtqXJ7bPA%40mail.gmail.com.
--047d7bf0dbf093fc5d053aab5c0d
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>The example of operator& wouldn't work becaus=
e (though it's not recommended) one can return any type from it, in whi=
ch case auto & would perform type deduction, not 'use my own class =
name'. Same goes for most of the other operators.<br><br></div>So at a =
minimum, a different keyword would be needed for this. I don't think th=
ere are any lying around that can be repurposed, so it'd probably requi=
re a new one.<br></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CACGiwhGW5Bj1JRi%3Dy8AHeVOc_96MTRPQtH=
8%2B07Uh8OtqXJ7bPA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhGW5Bj1=
JRi%3Dy8AHeVOc_96MTRPQtH8%2B07Uh8OtqXJ7bPA%40mail.gmail.com</a>.<br />
--047d7bf0dbf093fc5d053aab5c0d--
.
Author: Thiago Macieira <thiago@macieira.org>
Date: Mon, 22 Aug 2016 11:17:00 -0700
Raw View
On segunda-feira, 22 de agosto de 2016 09:12:07 PDT btcrtn@gmail.com wrote:
> template<class T>
> class SomeLongClassName {
> public:
> // Short and readable
> auto& operator = (const auto& other) {/*...*/}
> };
This is already valid syntax in C++17 and declares a template function.
There are some other proposals to have "operator auto" to solve an existing
problem, so it may not be a good idea to hijack this functionality for
aesthetics.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/6534990.fDUYxyGSj8%40tjmaciei-mobl1.
.
Author: Tom Honermann <tom@honermann.net>
Date: Mon, 22 Aug 2016 14:52:18 -0400
Raw View
On 8/22/2016 2:17 PM, Thiago Macieira wrote:
> On segunda-feira, 22 de agosto de 2016 09:12:07 PDT btcrtn@gmail.com wrote:
>> template<class T>
>> class SomeLongClassName {
>> public:
>> // Short and readable
>> auto& operator = (const auto& other) {/*...*/}
>> };
> This is already valid syntax in C++17 and declares a template function.
I think use of auto to declare a parameter is still restricted to
generic lambda expressions. The Concepts TS has extensions to allow
declaring a function template by declaring a parameter with 'auto', but
as far as I know, that syntax has not been accepted into C++17.
Tom.
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/1a2b158a-6d2f-c099-6098-7af0613ead9e%40honermann.net.
.
Author: btcrtn@gmail.com
Date: Mon, 22 Aug 2016 12:13:34 -0700 (PDT)
Raw View
------=_Part_459_2141908037.1471893214836
Content-Type: multipart/alternative;
boundary="----=_Part_460_1141057059.1471893214836"
------=_Part_460_1141057059.1471893214836
Content-Type: text/plain; charset=UTF-8
Perhaps an existing keyword can be used without creating ambiguity.
I think class, typename or decltype could be appropriate. I would
personally favor class.
class C
{
class();
explicit class(int value);
class& operator = (const class& other);
class& operator += (int value);
~class();
} c;
c.~class();
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/338d89cc-96cc-4b52-8425-b4fbc463b14b%40isocpp.org.
------=_Part_460_1141057059.1471893214836
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Perhaps an existing keyword can be used without creating a=
mbiguity.<br>I think <span style=3D"color: rgb(0, 0, 255);"><span style=3D"=
font-family: courier new,monospace;">class</span></span>, <span style=3D"co=
lor: rgb(0, 0, 255);"><span style=3D"font-family: courier new,monospace;">t=
ypename</span> </span>or <span style=3D"color: rgb(0, 0, 255);"><span style=
=3D"font-family: courier new,monospace;">decltype</span> </span>could be ap=
propriate. I would personally favor <span style=3D"color: rgb(0, 0, 255);">=
<span style=3D"font-family: courier new,monospace;">class</span></span>.<br=
><br><div class=3D"prettyprint" style=3D"background-color: rgb(250, 250, 25=
0); border-color: rgb(187, 187, 187); border-style: solid; border-width: 1p=
x; word-wrap: break-word;"><code class=3D"prettyprint"><div class=3D"subpre=
ttyprint"><span style=3D"color: #008;" class=3D"styled-by-prettify">class</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> C<br></span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">{</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 </span><span s=
tyle=3D"color: #008;" class=3D"styled-by-prettify">class</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">();</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"><br>=C2=A0 </span><span style=3D"co=
lor: #008;" class=3D"styled-by-prettify">explicit</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;"=
class=3D"styled-by-prettify">class</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">(</span><span style=3D"color: #008;" class=3D"styl=
ed-by-prettify">int</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> value</span><span style=3D"color: #660;" class=3D"styled-by-prett=
ify">);</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br=
>=C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-prettify">cl=
ass</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><spa=
n style=3D"color: #008;" class=3D"styled-by-prettify">operator</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" cl=
ass=3D"styled-by-prettify">(</span><span style=3D"color: #008;" class=3D"st=
yled-by-prettify">const</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">class</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&=
amp;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> other=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">);</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 </span>=
<span style=3D"color: #008;" class=3D"styled-by-prettify">class</span><span=
style=3D"color: #660;" class=3D"styled-by-prettify">&</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"colo=
r: #008;" class=3D"styled-by-prettify">operator</span><span style=3D"color:=
#000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">+=3D</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">(</span><span style=3D"color: #008;" class=3D"styled-by-pret=
tify">int</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
value</span><span style=3D"color: #660;" class=3D"styled-by-prettify">);</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 </=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">~</span><spa=
n style=3D"color: #008;" class=3D"styled-by-prettify">class</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">();</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">}</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> c</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">;</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"><br>c</span><span style=3D"color: #660;" class=3D"styled-by-prett=
ify">.~</span><span style=3D"color: #008;" class=3D"styled-by-prettify">cla=
ss</span><span style=3D"color: #660;" class=3D"styled-by-prettify">();</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></span></di=
v></code></div><br><br></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/338d89cc-96cc-4b52-8425-b4fbc463b14b%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/338d89cc-96cc-4b52-8425-b4fbc463b14b=
%40isocpp.org</a>.<br />
------=_Part_460_1141057059.1471893214836--
------=_Part_459_2141908037.1471893214836--
.
Author: "D. B." <db0451@gmail.com>
Date: Mon, 22 Aug 2016 20:34:00 +0100
Raw View
--94eb2c075ada508cb4053aae2100
Content-Type: text/plain; charset=UTF-8
On Mon, Aug 22, 2016 at 7:52 PM, Tom Honermann <tom@honermann.net> wrote:
> On 8/22/2016 2:17 PM, Thiago Macieira wrote:
>
>> On segunda-feira, 22 de agosto de 2016 09:12:07 PDT btcrtn@gmail.com
>> wrote:
>>
>>> template<class T>
>>> class SomeLongClassName {
>>> public:
>>> // Short and readable
>>> auto& operator = (const auto& other) {/*...*/}
>>> };
>>>
>> This is already valid syntax in C++17 and declares a template function.
>>
> I think use of auto to declare a parameter is still restricted to generic
> lambda expressions. The Concepts TS has extensions to allow declaring a
> function template by declaring a parameter with 'auto', but as far as I
> know, that syntax has not been accepted into C++17.
>
>
Yeah, it's not valid syntax as of now, but even if auto parameters were
available, it wouldn't be valid for what the OP wants to do, as there would
be fatal ambiguity between whether one wanted the class type or an actual
auto i.e. deduced type.
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhHcoVzzn8zL0eiPykyfKUqHG191wLpvhJmCqaXWRFOFtg%40mail.gmail.com.
--94eb2c075ada508cb4053aae2100
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On Mon, Aug 22, 2016 at 7:52 PM, Tom Honermann <span dir=3D"ltr"><<a=
href=3D"mailto:tom@honermann.net" target=3D"_blank">tom@honermann.net</a>&=
gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 =
0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=3D"">On 8/2=
2/2016 2:17 PM, Thiago Macieira wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
On segunda-feira, 22 de agosto de 2016 09:12:07 PDT <a href=3D"mailto:btcrt=
n@gmail.com" target=3D"_blank">btcrtn@gmail.com</a> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
template<class T><br>
class SomeLongClassName {<br>
public:<br>
=C2=A0 =C2=A0 =C2=A0// Short and readable<br>
=C2=A0 =C2=A0 =C2=A0auto& operator =3D (const auto& other) {/*...*/=
}<br>
};<br>
</blockquote>
This is already valid syntax in C++17 and declares a template function.<br>
</blockquote></span>
I think use of auto to declare a parameter is still restricted to generic l=
ambda expressions.=C2=A0 The Concepts TS has extensions to allow declaring =
a function template by declaring a parameter with 'auto', but as fa=
r as I know, that syntax has not been accepted into C++17.<br><br></blockqu=
ote><div><br></div><div>Yeah, it's not valid syntax as of now, but even=
if auto parameters were available, it wouldn't be valid for what the O=
P wants to do, as there would be fatal ambiguity between whether one wanted=
the class type or an actual auto i.e. deduced=C2=A0 type.<br><br></div></d=
iv></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CACGiwhHcoVzzn8zL0eiPykyfKUqHG191wLpv=
hJmCqaXWRFOFtg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhHcoVzzn8zL=
0eiPykyfKUqHG191wLpvhJmCqaXWRFOFtg%40mail.gmail.com</a>.<br />
--94eb2c075ada508cb4053aae2100--
.
Author: gmisocpp@gmail.com
Date: Mon, 22 Aug 2016 15:52:06 -0700 (PDT)
Raw View
------=_Part_7336_1215537687.1471906326284
Content-Type: multipart/alternative;
boundary="----=_Part_7337_575392812.1471906326285"
------=_Part_7337_575392812.1471906326285
Content-Type: text/plain; charset=UTF-8
Is their as much value proposal now that we have editors and IDE's that are
getting so good at renaming?
I don't know if 'this' would work for your purposes, though I doubt it.
Perhaps we could also introduce a 'self' keyword. And that could be used
here, though I'd kind of like that to work like 'this' but be a reference
(or use _ maybe).
On Tuesday, August 23, 2016 at 4:12:07 AM UTC+12, btc...@gmail.com wrote:
> I apologize if an idea like this has been discussed/rejected before, I
> have not found a relevant discussion.
> Are there any compelling reasons that retyping the class name should be
> required for ctors etc. ?
>
> I propose allowing 'auto' in place of the class name.
>
> template<class T>
> class SomeLongClassName {
> public:
> // Short and readable
> auto& operator = (const auto& other) {/*...*/}
> };
>
> SomeLongClassName<long long double> a;
> a.~auto(); // Nice and short
>
> // Allows for special member functions in anonymous classes
> class {
> auto() {/*...*/}
> auto& operator = (auto&& other) {/*...*/}
> ~auto() {/*...*/}
> };
>
> Since I have zero experience with proposals, I would just like to know if
> a change like this could be benefitial, or is complete nonsense.
>
> Kind regards,
> Patrick
>
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/e2b55879-1ec0-4106-9852-1f4efe097eaf%40isocpp.org.
------=_Part_7337_575392812.1471906326285
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div><br></div><div>Is their as much value proposal now th=
at we have editors and IDE's that are getting so good at renaming?</div=
><div><br></div><div>I don't know if 'this' would work for your=
purposes, though I doubt it. Perhaps we could also introduce a 'self&#=
39; keyword. And that could be=C2=A0used here, though I'd kind of like =
that to=C2=A0work like 'this' but be a reference (or=C2=A0use _ may=
be).</div><div><br><br>On Tuesday, August 23, 2016 at 4:12:07 AM UTC+12, bt=
c...@gmail.com wrote:</div><blockquote class=3D"gmail_quote" style=3D"margi=
n: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 2=
04); border-left-width: 1px; border-left-style: solid;"><div dir=3D"ltr">I =
apologize if an idea like this has been discussed/rejected before, I have n=
ot found a relevant discussion.<br>Are there any compelling reasons that re=
typing the class name should be required for ctors etc. ?<br><br>I propose =
allowing '<span style=3D"font-family: courier new,monospace;">auto</spa=
n>' in place of the class name.<br><br><div style=3D"border: 1px solid =
rgb(187, 187, 187); border-image: none; -ms-word-wrap: break-word; backgrou=
nd-color: rgb(250, 250, 250);"><code><div><span style=3D"color: rgb(0, 0, 1=
36);">template</span><span style=3D"color: rgb(102, 102, 0);"><</span><s=
pan style=3D"color: rgb(0, 0, 136);">class</span><span style=3D"color: rgb(=
0, 0, 0);"> T</span><span style=3D"color: rgb(102, 102, 0);">></span><sp=
an style=3D"color: rgb(0, 0, 0);"><br></span><span style=3D"color: rgb(0, 0=
, 136);">class</span><span style=3D"color: rgb(0, 0, 0);"> </span><span sty=
le=3D"color: rgb(102, 0, 102);">SomeLongClassName</span><span style=3D"colo=
r: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(102, 102, 0);">{</span>=
<span style=3D"color: rgb(0, 0, 0);"><br></span><span style=3D"color: rgb(0=
, 0, 136);">public</span><span style=3D"color: rgb(102, 102, 0);">:</span><=
span style=3D"color: rgb(0, 0, 0);"><br>=C2=A0 =C2=A0 </span><span style=3D=
"color: rgb(136, 0, 0);">// Short and readable</span><span style=3D"color: =
rgb(0, 0, 0);"><br>=C2=A0 =C2=A0 </span><span style=3D"color: rgb(0, 0, 136=
);">auto</span><span style=3D"color: rgb(102, 102, 0);">&</span><span s=
tyle=3D"color: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(0, 0, 136);=
">operator</span><span style=3D"color: rgb(0, 0, 0);"> </span><span style=
=3D"color: rgb(102, 102, 0);">=3D</span><span style=3D"color: rgb(0, 0, 0);=
"> </span><span style=3D"color: rgb(102, 102, 0);">(</span><span style=3D"c=
olor: rgb(0, 0, 136);">const</span><span style=3D"color: rgb(0, 0, 0);"> </=
span><span style=3D"color: rgb(0, 0, 136);">auto</span><span style=3D"color=
: rgb(102, 102, 0);">&</span><span style=3D"color: rgb(0, 0, 0);"> othe=
r</span><span style=3D"color: rgb(102, 102, 0);">)</span><span style=3D"col=
or: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(102, 102, 0);">{</span=
><span style=3D"color: rgb(136, 0, 0);">/*...*/</span><span style=3D"color:=
rgb(102, 102, 0);">}</span><span style=3D"color: rgb(0, 0, 0);"><br></span=
><span style=3D"color: rgb(102, 102, 0);">};</span><span style=3D"color: rg=
b(0, 0, 0);"><br><br></span><span style=3D"color: rgb(102, 0, 102);">SomeLo=
ngClassName</span><span style=3D"color: rgb(102, 102, 0);"><</span><span=
style=3D"color: rgb(0, 0, 136);">long</span><span style=3D"color: rgb(0, 0=
, 0);"> </span><span style=3D"color: rgb(0, 0, 136);">long</span><span styl=
e=3D"color: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(0, 0, 136);">d=
ouble</span><span style=3D"color: rgb(102, 102, 0);">></span><span style=
=3D"color: rgb(0, 0, 0);"> a</span><span style=3D"color: rgb(102, 102, 0);"=
>;</span><span style=3D"color: rgb(0, 0, 0);"><br>a</span><span style=3D"co=
lor: rgb(102, 102, 0);">.~</span><span style=3D"color: rgb(0, 0, 136);">aut=
o</span><span style=3D"color: rgb(102, 102, 0);">();</span><span style=3D"c=
olor: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(136, 0, 0);">// Nice=
and short</span><span style=3D"color: rgb(0, 0, 0);"><br><br></span><span =
style=3D"color: rgb(136, 0, 0);">// Allows for special member functions in =
anonymous classes</span><span style=3D"color: rgb(0, 0, 0);"><br></span><sp=
an style=3D"color: rgb(0, 0, 136);">class</span><span style=3D"color: rgb(0=
, 0, 0);"> </span><span style=3D"color: rgb(102, 102, 0);">{</span><span st=
yle=3D"color: rgb(0, 0, 0);"><br>=C2=A0 =C2=A0 </span><span style=3D"color:=
rgb(0, 0, 136);">auto</span><span style=3D"color: rgb(102, 102, 0);">()</s=
pan><span style=3D"color: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(=
102, 102, 0);">{</span><span style=3D"color: rgb(136, 0, 0);">/*...*/</span=
><span style=3D"color: rgb(102, 102, 0);">}</span><span style=3D"color: rgb=
(0, 0, 0);"><br>=C2=A0 =C2=A0 </span><span style=3D"color: rgb(0, 0, 136);"=
>auto</span><span style=3D"color: rgb(102, 102, 0);">&</span><span styl=
e=3D"color: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(0, 0, 136);">o=
perator</span><span style=3D"color: rgb(0, 0, 0);"> </span><span style=3D"c=
olor: rgb(102, 102, 0);">=3D</span><span style=3D"color: rgb(0, 0, 0);"> </=
span><span style=3D"color: rgb(102, 102, 0);">(</span><span style=3D"color:=
rgb(0, 0, 136);">auto</span><span style=3D"color: rgb(102, 102, 0);">&=
&</span><span style=3D"color: rgb(0, 0, 0);"> other</span><span style=
=3D"color: rgb(102, 102, 0);">)</span><span style=3D"color: rgb(0, 0, 0);">=
</span><span style=3D"color: rgb(102, 102, 0);">{</span><span style=3D"col=
or: rgb(136, 0, 0);">/*...*/</span><span style=3D"color: rgb(102, 102, 0);"=
>}</span><span style=3D"color: rgb(0, 0, 0);"><br>=C2=A0 =C2=A0 </span><spa=
n style=3D"color: rgb(102, 102, 0);">~</span><span style=3D"color: rgb(0, 0=
, 136);">auto</span><span style=3D"color: rgb(102, 102, 0);">()</span><span=
style=3D"color: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(102, 102,=
0);">{</span><span style=3D"color: rgb(136, 0, 0);">/*...*/</span><span st=
yle=3D"color: rgb(102, 102, 0);">}</span><span style=3D"color: rgb(0, 0, 0)=
;"><br></span><span style=3D"color: rgb(102, 102, 0);">};</span><span style=
=3D"color: rgb(0, 0, 0);"><br></span></div></code></div><br>Since I have ze=
ro experience with proposals, I would just like to know if a change like th=
is could be benefitial, or is complete nonsense.<br><br>Kind regards,<br>Pa=
trick<br></div></blockquote></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/e2b55879-1ec0-4106-9852-1f4efe097eaf%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/e2b55879-1ec0-4106-9852-1f4efe097eaf=
%40isocpp.org</a>.<br />
------=_Part_7337_575392812.1471906326285--
------=_Part_7336_1215537687.1471906326284--
.
Author: Bryce Glover <randomdsdevel@gmail.com>
Date: Mon, 22 Aug 2016 18:56:02 -0400
Raw View
--Apple-Mail=_D3FF3152-C6E5-4AFA-9D12-A6702AA97625
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8
Wouldn=E2=80=99t `(decltype(*this))&` (parentheses added just in case) work=
today, or am I mistaken? =20
=E2=80=94=E2=80=89Bryce Glover
=E3=80=80=E2=80=89RandomDSdevel@gmail.com
--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/ACE3BD9E-9375-4325-A92A-41E8C6AEA681%40gmail.com=
..
--Apple-Mail=_D3FF3152-C6E5-4AFA-9D12-A6702AA97625
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8
<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dutf-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: s=
pace; -webkit-line-break: after-white-space;" class=3D""><div class=3D"">Wo=
uldn=E2=80=99t `(decltype(*this))&` (parentheses added just in case) wo=
rk today, or am I mistaken? </div><br class=3D""><div class=3D"">
<div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; t=
ext-align: start; text-indent: 0px; text-transform: none; white-space: norm=
al; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-w=
rap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-=
space;" class=3D""><div style=3D"color: rgb(0, 0, 0); letter-spacing: norma=
l; orphans: auto; text-align: start; text-indent: 0px; text-transform: none=
; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke=
-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-=
break: after-white-space;" class=3D""><div class=3D"">=E2=80=94=E2=80=89Bry=
ce Glover</div><div class=3D"">=E3=80=80=E2=80=89<a href=3D"mailto:RandomDS=
devel@gmail.com" class=3D"">RandomDSdevel@gmail.com</a></div></div></div></=
div></body></html>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/ACE3BD9E-9375-4325-A92A-41E8C6AEA681%=
40gmail.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/ACE3BD9E-9375-4325-A92A-41E8C6AEA681%=
40gmail.com</a>.<br />
--Apple-Mail=_D3FF3152-C6E5-4AFA-9D12-A6702AA97625--
.
Author: Thiago Macieira <thiago@macieira.org>
Date: Mon, 22 Aug 2016 21:49:41 -0700
Raw View
On segunda-feira, 22 de agosto de 2016 18:56:02 PDT Bryce Glover wrote:
> Wouldn=E2=80=99t `(decltype(*this))&` (parentheses added just in case) wo=
rk today,
> or am I mistaken?
It wouldn't because you're not allowed to use "this" in that context.
--=20
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/2639645.lXh2V3EsX7%40tjmaciei-mobl1.
.
Author: "D. B." <db0451@gmail.com>
Date: Tue, 23 Aug 2016 06:41:29 +0100
Raw View
--001a114b4444db08d8053ab69de4
Content-Type: text/plain; charset=UTF-8
On Mon, Aug 22, 2016 at 8:13 PM, <btcrtn@gmail.com> wrote:
> Perhaps an existing keyword can be used without creating ambiguity.
> I think class, typename or decltype could be appropriate. I would
> personally favor class.
>
> class C
> {
> class();
> explicit class(int value);
> class& operator = (const class& other);
> class& operator += (int value);
> ~class();
> } c;
> c.~class();
>
>
Ambiguity, maybe not. Confusion? Almost certainly! More parsing horror,
probably. Here are my half-formed thoughts on these options:
*class* seems nice but (aside from introducing another divergence from
symmetry with *struct*, which isn't necessarily a bad thing!) would create
visual confusion with in-class forward declarations, etc.
*class C {*
* class() = delete;*
* class(int);*
* // prepare for visual triple-take*
* class Pimpl;*
*};*
*typename* is worse: imagine the visual noise in templates, with their
already many different uses of this, and trying to figure out which is
which at any given moment.. *yikes*. Here's a totally made-up sample:
*template<typename T>*
*class C {*
* typename Traits<T>::member_type m_member;*
* typename() = delete;*
* typename(C const&);*
* template<typename U>*
* typename(U, typename Traits<T>::allocator_type);*
* ~typename();*
*};*
*[Please...no more...]*
*decltype *with no operand might work, but then I think they deliberately
chose that keyword to be ugly to minimise clashes with pre-existing code,
so is it really an improvement? ;-) I guess it would be!
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhHCELR_CwWXnbyXYEL65V5sBRorKhsQm8NWJLmqEOz3bw%40mail.gmail.com.
--001a114b4444db08d8053ab69de4
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, Aug 22, 2016 at 8:13 PM, <span dir=3D"ltr"><<a href=3D"mailto:btcrt=
n@gmail.com" target=3D"_blank">btcrtn@gmail.com</a>></span> wrote:<br><b=
lockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px =
#ccc solid;padding-left:1ex"><div dir=3D"ltr">Perhaps an existing keyword c=
an be used without creating ambiguity.<br>I think <span style=3D"color:rgb(=
0,0,255)"><span style=3D"font-family:courier new,monospace">class</span></s=
pan>, <span style=3D"color:rgb(0,0,255)"><span style=3D"font-family:courier=
new,monospace">typename</span> </span>or <span style=3D"color:rgb(0,0,255)=
"><span style=3D"font-family:courier new,monospace">decltype</span> </span>=
could be appropriate. I would personally favor <span style=3D"color:rgb(0,0=
,255)"><span style=3D"font-family:courier new,monospace">class</span></span=
>.<br><br><div style=3D"background-color:rgb(250,250,250);border-color:rgb(=
187,187,187);border-style:solid;border-width:1px;word-wrap:break-word"><cod=
e><div><span style=3D"color:#008">class</span><span style=3D"color:#000"> C=
<br></span><span style=3D"color:#660">{</span><span style=3D"color:#000"><b=
r>=C2=A0 </span><span style=3D"color:#008">class</span><span style=3D"color=
:#660">();</span><span style=3D"color:#000"><br>=C2=A0 </span><span style=
=3D"color:#008">explicit</span><span style=3D"color:#000"> </span><span sty=
le=3D"color:#008">class</span><span style=3D"color:#660">(</span><span styl=
e=3D"color:#008">int</span><span style=3D"color:#000"> value</span><span st=
yle=3D"color:#660">);</span><span style=3D"color:#000"><br>=C2=A0 </span><s=
pan style=3D"color:#008">class</span><span style=3D"color:#660">&</span=
><span style=3D"color:#000"> </span><span style=3D"color:#008">operator</sp=
an><span style=3D"color:#000"> </span><span style=3D"color:#660">=3D</span>=
<span style=3D"color:#000"> </span><span style=3D"color:#660">(</span><span=
style=3D"color:#008">const</span><span style=3D"color:#000"> </span><span =
style=3D"color:#008">class</span><span style=3D"color:#660">&</span><sp=
an style=3D"color:#000"> other</span><span style=3D"color:#660">);</span><s=
pan style=3D"color:#000"><br>=C2=A0 </span><span style=3D"color:#008">class=
</span><span style=3D"color:#660">&</span><span style=3D"color:#000"> <=
/span><span style=3D"color:#008">operator</span><span style=3D"color:#000">=
</span><span style=3D"color:#660">+=3D</span><span style=3D"color:#000"> <=
/span><span style=3D"color:#660">(</span><span style=3D"color:#008">int</sp=
an><span style=3D"color:#000"> value</span><span style=3D"color:#660">);</s=
pan><span style=3D"color:#000"><br>=C2=A0 </span><span style=3D"color:#660"=
>~</span><span style=3D"color:#008">class</span><span style=3D"color:#660">=
();</span><span style=3D"color:#000"><br></span><span style=3D"color:#660">=
}</span><span style=3D"color:#000"> c</span><span style=3D"color:#660">;</s=
pan><span style=3D"color:#000"><br>c</span><span style=3D"color:#660">.~</s=
pan><span style=3D"color:#008">class</span><span style=3D"color:#660">();</=
span><span style=3D"color:#000"><br></span></div></code></div><br></div></b=
lockquote><div><br></div><div>Ambiguity, maybe not. Confusion? Almost certa=
inly! More parsing horror, probably. Here are my half-formed thoughts on th=
ese options:<br><br></div><div><i>class</i> seems nice but (aside from intr=
oducing another divergence from symmetry with <i>struct</i>, which isn'=
t necessarily a bad thing!) would create visual confusion with in-class for=
ward declarations, etc.<i><br><br></i></div><div style=3D"margin-left:40px"=
><i>class C {<br></i></div><div style=3D"margin-left:40px"><i>=C2=A0=C2=A0=
=C2=A0 class() =3D delete;<br></i></div><div style=3D"margin-left:40px"><i>=
=C2=A0=C2=A0=C2=A0 class(int);<br><br></i></div><div style=3D"margin-left:4=
0px"><i>=C2=A0=C2=A0=C2=A0 // prepare for visual triple-take<br></i></div><=
div style=3D"margin-left:40px"><i><br></i></div><div style=3D"margin-left:4=
0px"><i>=C2=A0=C2=A0=C2=A0 class Pimpl;<br></i></div><div style=3D"margin-l=
eft:40px"><i>};<br></i></div><div><i><br></i><i>typename</i> is worse: imag=
ine the visual noise in templates, with their already many different uses o=
f this, and trying to figure out which is which at any given moment.. <b>yi=
kes</b>. Here's a totally made-up sample:<i><br><br></i></div><div styl=
e=3D"margin-left:40px"><i>template<typename T><br></i></div><div styl=
e=3D"margin-left:40px"><i>class C {<br></i></div><div style=3D"margin-left:=
40px"><i>=C2=A0=C2=A0=C2=A0 typename Traits<T>::member_type m_member;=
<br></i></div><div style=3D"margin-left:40px"><i><br></i></div><div style=
=3D"margin-left:40px"><i>=C2=A0=C2=A0=C2=A0 typename() =3D delete;<br></i><=
/div><div style=3D"margin-left:40px"><i>=C2=A0=C2=A0=C2=A0 typename(C const=
&);<br></i></div><div style=3D"margin-left:40px"><i><br></i></div><div =
style=3D"margin-left:40px"><i>=C2=A0=C2=A0=C2=A0 template<typename U>=
<br></i></div><div style=3D"margin-left:40px"><i>=C2=A0=C2=A0=C2=A0 typenam=
e(U, typename Traits<T>::allocator_type);<br><br></i></div><div style=
=3D"margin-left:40px"><i>=C2=A0=C2=A0=C2=A0 ~typename();<br></i></div><div =
style=3D"margin-left:40px"><i>};<br></i></div><div><i><br></i></div><div><i=
>[Please...no more...]<br></i></div><div><i><br>decltype </i>with no operan=
d might work, but then I think they deliberately chose that keyword to be u=
gly to minimise clashes with pre-existing code, so is it really an improvem=
ent? ;-) I guess it would be!<i><br><br></i></div><div><br></div></div></di=
v></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CACGiwhHCELR_CwWXnbyXYEL65V5sBRorKhsQ=
m8NWJLmqEOz3bw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhHCELR_CwWX=
nbyXYEL65V5sBRorKhsQm8NWJLmqEOz3bw%40mail.gmail.com</a>.<br />
--001a114b4444db08d8053ab69de4--
.
Author: "'Johannes Schaub' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Tue, 23 Aug 2016 10:31:32 +0200
Raw View
--001a113f6792f8a0e9053ab8fd54
Content-Type: text/plain; charset=UTF-8
INBO (in my bikeshed opinion), "class" seems an appealing choice here. For
symmetry, "struct" and union (for unions) should be allowed aswell.
For operator=, there is an ambiguity with elaborated type specifiers though
R operator=(class paramname);
Can aswell mean that it has an unnamed parameter of type "paramname".
Am 23.08.2016 07:41 schrieb "D. B." <db0451@gmail.com>:
>
> On Mon, Aug 22, 2016 at 8:13 PM, <btcrtn@gmail.com> wrote:
>>
>> Perhaps an existing keyword can be used without creating ambiguity.
>> I think class, typename or decltype could be appropriate. I would
personally favor class.
>>
>> class C
>> {
>> class();
>> explicit class(int value);
>> class& operator = (const class& other);
>> class& operator += (int value);
>> ~class();
>> } c;
>> c.~class();
>>
>
> Ambiguity, maybe not. Confusion? Almost certainly! More parsing horror,
probably. Here are my half-formed thoughts on these options:
>
> class seems nice but (aside from introducing another divergence from
symmetry with struct, which isn't necessarily a bad thing!) would create
visual confusion with in-class forward declarations, etc.
>
> class C {
> class() = delete;
> class(int);
>
> // prepare for visual triple-take
>
> class Pimpl;
> };
>
> typename is worse: imagine the visual noise in templates, with their
already many different uses of this, and trying to figure out which is
which at any given moment.. yikes. Here's a totally made-up sample:
>
> template<typename T>
> class C {
> typename Traits<T>::member_type m_member;
>
> typename() = delete;
> typename(C const&);
>
> template<typename U>
> typename(U, typename Traits<T>::allocator_type);
>
> ~typename();
> };
>
> [Please...no more...]
>
> decltype with no operand might work, but then I think they deliberately
chose that keyword to be ugly to minimise clashes with pre-existing code,
so is it really an improvement? ;-) I guess it would be!
>
>
> --
> You received this message because you are subscribed to the Google Groups
"ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email to std-proposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> To view this discussion on the web visit
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhHCELR_CwWXnbyXYEL65V5sBRorKhsQm8NWJLmqEOz3bw%40mail.gmail.com
..
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CANu6V4W8T6N1XLh%2BQ1opeMT_xeqUiUxTsvrMz6OYk%3DAewG6r-A%40mail.gmail.com.
--001a113f6792f8a0e9053ab8fd54
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<p dir=3D"ltr">INBO (in my bikeshed opinion), "class" seems an ap=
pealing choice here. For symmetry, "struct" and union (for unions=
) should be allowed aswell.</p>
<p dir=3D"ltr">For operator=3D, there is an ambiguity with elaborated type =
specifiers though</p>
<p dir=3D"ltr">=C2=A0=C2=A0=C2=A0 R operator=3D(class paramname);</p>
<p dir=3D"ltr">Can aswell mean that it has an unnamed parameter of type &qu=
ot;paramname".</p>
<p dir=3D"ltr">Am 23.08.2016 07:41 schrieb "D. B." <<a href=3D=
"mailto:db0451@gmail.com">db0451@gmail.com</a>>:<br>
><br>
> On Mon, Aug 22, 2016 at 8:13 PM, <<a href=3D"mailto:btcrtn@gmail.co=
m">btcrtn@gmail.com</a>> wrote:<br>
>><br>
>> Perhaps an existing keyword can be used without creating ambiguity=
..<br>
>> I think class, typename or decltype could be appropriate. I would =
personally favor class.<br>
>><br>
>> class C<br>
>> {<br>
>> =C2=A0 class();<br>
>> =C2=A0 explicit class(int value);<br>
>> =C2=A0 class& operator =3D (const class& other);<br>
>> =C2=A0 class& operator +=3D (int value);<br>
>> =C2=A0 ~class();<br>
>> } c;<br>
>> c.~class();<br>
>><br>
><br>
> Ambiguity, maybe not. Confusion? Almost certainly! More parsing horror=
, probably. Here are my half-formed thoughts on these options:<br>
><br>
> class seems nice but (aside from introducing another divergence from s=
ymmetry with struct, which isn't necessarily a bad thing!) would create=
visual confusion with in-class forward declarations, etc.<br>
><br>
> class C {<br>
> =C2=A0=C2=A0=C2=A0 class() =3D delete;<br>
> =C2=A0=C2=A0=C2=A0 class(int);<br>
><br>
> =C2=A0=C2=A0=C2=A0 // prepare for visual triple-take<br>
><br>
> =C2=A0=C2=A0=C2=A0 class Pimpl;<br>
> };<br>
><br>
> typename is worse: imagine the visual noise in templates, with their a=
lready many different uses of this, and trying to figure out which is which=
at any given moment.. yikes. Here's a totally made-up sample:<br>
><br>
> template<typename T><br>
> class C {<br>
> =C2=A0=C2=A0=C2=A0 typename Traits<T>::member_type m_member;<br>
><br>
> =C2=A0=C2=A0=C2=A0 typename() =3D delete;<br>
> =C2=A0=C2=A0=C2=A0 typename(C const&);<br>
><br>
> =C2=A0=C2=A0=C2=A0 template<typename U><br>
> =C2=A0=C2=A0=C2=A0 typename(U, typename Traits<T>::allocator_typ=
e);<br>
><br>
> =C2=A0=C2=A0=C2=A0 ~typename();<br>
> };<br>
><br>
> [Please...no more...]<br>
><br>
> decltype with no operand might work, but then I think they deliberatel=
y chose that keyword to be ugly to minimise clashes with pre-existing code,=
so is it really an improvement? ;-) I guess it would be!<br>
><br>
><br>
> -- <br>
> You received this message because you are subscribed to the Google Gro=
ups "ISO C++ Standard - Future Proposals" group.<br>
> To unsubscribe from this group and stop receiving emails from it, send=
an email to <a href=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org">std-=
proposals+unsubscribe@isocpp.org</a>.<br>
> To post to this group, send email to <a href=3D"mailto:std-proposals@i=
socpp.org">std-proposals@isocpp.org</a>.<br>
> To view this discussion on the web visit <a href=3D"https://groups.goo=
gle.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhHCELR_CwWXnbyXYEL65V5sBRo=
rKhsQm8NWJLmqEOz3bw%40mail.gmail.com">https://groups.google.com/a/isocpp.or=
g/d/msgid/std-proposals/CACGiwhHCELR_CwWXnbyXYEL65V5sBRorKhsQm8NWJLmqEOz3bw=
%40mail.gmail.com</a>.<br>
</p>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CANu6V4W8T6N1XLh%2BQ1opeMT_xeqUiUxTsv=
rMz6OYk%3DAewG6r-A%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CANu6V4W8T6N1=
XLh%2BQ1opeMT_xeqUiUxTsvrMz6OYk%3DAewG6r-A%40mail.gmail.com</a>.<br />
--001a113f6792f8a0e9053ab8fd54--
.
Author: btcrtn@gmail.com
Date: Tue, 23 Aug 2016 01:46:13 -0700 (PDT)
Raw View
------=_Part_5307_929331334.1471941973850
Content-Type: multipart/alternative;
boundary="----=_Part_5308_1757731992.1471941973852"
------=_Part_5308_1757731992.1471941973852
Content-Type: text/plain; charset=UTF-8
If class introduces too many issues, the compiler could define self_t to
mean the type of the enclosing class, which would not be too hard I imagine.
template<class T>
class SomeClass {
// Make the compiler do something like this implicitly.
using self_t = SomeClass;
// I think this looks nice.
self_t(int a, int b);
self_t() : self_t(42, 1337) {}
self_t& operator = (const self_t& );
// Should 'self_t' be 'SomeClass<T>' or 'SomeClass', allowing the
following?
template<class U>
self_t& operator = (const self_t<U>& );
// This is invalid right now. Should be valid. Why whould it not be?
~self_t();
};
class {
using self_t = ???; // Can't be done right now.
};
How to handle calling the destructor?
class C {
template<class T>
void destroy(T& object) {
// Confusing use of 'self_t'? Is it 'T' or 'C'?
object.~self_t();
// Is the above an exception, or do we allow the following?
object.self_t another_object;
// What if we drop the destructor name? What do we need it for anyway?
object.~();
}
// Also elide the name in the declaration?
~() { /* Now it really can't get any shorter. */ }
};
On Tuesday, August 23, 2016 at 12:52:06 AM UTC+2, gmis...@gmail.com wrote:
>
>
> Is their as much value proposal now that we have editors and IDE's that
> are getting so good at renaming?
>
> I don't know if 'this' would work for your purposes, though I doubt it.
> Perhaps we could also introduce a 'self' keyword. And that could be used
> here, though I'd kind of like that to work like 'this' but be a reference
> (or use _ maybe).
>
>
> On Tuesday, August 23, 2016 at 4:12:07 AM UTC+12, btc...@gmail.com wrote:
>
>> I apologize if an idea like this has been discussed/rejected before, I
>> have not found a relevant discussion.
>> Are there any compelling reasons that retyping the class name should be
>> required for ctors etc. ?
>>
>> I propose allowing 'auto' in place of the class name.
>>
>> template<class T>
>> class SomeLongClassName {
>> public:
>> // Short and readable
>> auto& operator = (const auto& other) {/*...*/}
>> };
>>
>> SomeLongClassName<long long double> a;
>> a.~auto(); // Nice and short
>>
>> // Allows for special member functions in anonymous classes
>> class {
>> auto() {/*...*/}
>> auto& operator = (auto&& other) {/*...*/}
>> ~auto() {/*...*/}
>> };
>>
>> Since I have zero experience with proposals, I would just like to know if
>> a change like this could be benefitial, or is complete nonsense.
>>
>> Kind regards,
>> Patrick
>>
>
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/e54c473d-3a5f-4c8e-b4cc-3a5cdecad978%40isocpp.org.
------=_Part_5308_1757731992.1471941973852
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><span style=3D"background-color: rgb(255, 255, 255);"><spa=
n style=3D"color: rgb(0, 0, 0);"><span style=3D"font-family: arial,sans-ser=
if;">If <span style=3D"color: rgb(0, 0, 255);"><span style=3D"font-family: =
courier new,monospace;">class</span></span> introduces too many issues, the=
compiler could define <span style=3D"color: rgb(0, 0, 255);"><span style=
=3D"font-family: courier new,monospace;">self_t</span></span> to mean the t=
ype of the enclosing class, which would not be too hard I imagine.<br><br><=
/span></span></span><div class=3D"prettyprint" style=3D"background-color: r=
gb(250, 250, 250); border-color: rgb(187, 187, 187); border-style: solid; b=
order-width: 1px; word-wrap: break-word;"><code class=3D"prettyprint"><div =
class=3D"subprettyprint"><span style=3D"color: #008;" class=3D"styled-by-pr=
ettify">template</span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify"><</span><span style=3D"color: #008;" class=3D"styled-by-prettify">=
class</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> T</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">></span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span st=
yle=3D"color: #008;" class=3D"styled-by-prettify">class</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #606;" class=3D"styled-by-prettify">SomeClass</span><span style=3D"color:=
#000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">{</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"><br>=C2=A0 </span><span style=3D"color: #800;" class=3D"=
styled-by-prettify">// Make the compiler do something like this implicitly.=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0=
</span><span style=3D"color: #008;" class=3D"styled-by-prettify">using</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"> self_t </span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"=
color: #606;" class=3D"styled-by-prettify">SomeClass</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">;</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"><br>=C2=A0<br>=C2=A0 </span><span style=3D=
"color: #800;" class=3D"styled-by-prettify">// I think this looks nice.</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 sel=
f_t</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span=
><span style=3D"color: #008;" class=3D"styled-by-prettify">int</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> a</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" cla=
ss=3D"styled-by-prettify">int</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"> b</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">);</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"><br>=C2=A0 self_t</span><span style=3D"color: #660;" class=3D"styled-by-=
prettify">()</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">:</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> self_t</span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=
=3D"color: #066;" class=3D"styled-by-prettify">42</span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;"=
class=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D=
"styled-by-prettify">1337</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">)</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">{}<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =
self_t</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&=
;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><=
span style=3D"color: #008;" class=3D"styled-by-prettify">operator</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">(</span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">const</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"> self_t</span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">&</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">);</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br><b=
r>=C2=A0 </span><span style=3D"color: #800;" class=3D"styled-by-prettify">/=
/ Should 'self_t' be 'SomeClass<T>' or 'SomeClass=
', allowing the following?</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify"><br>=C2=A0 </span><span style=3D"color: #008;" class=3D=
"styled-by-prettify">template</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify"><</span><span style=3D"color: #008;" class=3D"styled-=
by-prettify">class</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> U</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
></span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=
=C2=A0 self_t</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">&</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> <=
/span><span style=3D"color: #008;" class=3D"styled-by-prettify">operator</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span=
style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #008;" =
class=3D"styled-by-prettify">const</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> self_t</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify"><</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify">U</span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">>&</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">);</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br><br>=C2=
=A0 </span><span style=3D"color: #800;" class=3D"styled-by-prettify">// Thi=
s is invalid right now. Should be valid. Why whould it not be?</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 </span><span=
style=3D"color: #660;" class=3D"styled-by-prettify">~</span><span style=3D=
"color: #000;" class=3D"styled-by-prettify">self_t</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">();</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #660;" cl=
ass=3D"styled-by-prettify">};</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"><br><br></span><span style=3D"color: #008;" class=3D"sty=
led-by-prettify">class</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">{</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=
=C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-prettify">usi=
ng</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> self_t =
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">???;</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #8=
00;" class=3D"styled-by-prettify">// Can't be done right now.</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">};</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"><br></span></div></code></div><br>=
How to handle calling the destructor?<br><br><div class=3D"prettyprint" sty=
le=3D"background-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187=
); border-style: solid; border-width: 1px; word-wrap: break-word;"><code cl=
ass=3D"prettyprint"><div class=3D"subprettyprint"><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #008;" cl=
ass=3D"styled-by-prettify">class</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> C </span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">{</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"><br>=C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-p=
rettify">template</span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify"><</span><span style=3D"color: #008;" class=3D"styled-by-prettify"=
>class</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> T</=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">></span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 </span>=
<span style=3D"color: #008;" class=3D"styled-by-prettify">void</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> destroy</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify">T</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">&</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"st=
yled-by-prettify">object</span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">)</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">{</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =
=C2=A0 </span><span style=3D"color: #800;" class=3D"styled-by-prettify">// =
Confusing use of 'self_t'? Is it 'T' or 'C'?</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0=
</span><span style=3D"color: #008;" class=3D"styled-by-prettify">object</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">.~</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify">self_t</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">();</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span s=
tyle=3D"color: #800;" class=3D"styled-by-prettify">// Is the above an excep=
tion, or do we allow the following?</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"color: #00=
8;" class=3D"styled-by-prettify">object</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">.</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify">self_t another_object</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">;</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"color: #800=
;" class=3D"styled-by-prettify">// What if we drop the destructor name? Wha=
t do we need it for anyway?</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"color: #008;" clas=
s=3D"styled-by-prettify">object</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">.~();</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"><br>=C2=A0 </span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">}</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"><br>=C2=A0 </span><span style=3D"color: #800;" class=3D"styled-by-p=
rettify">// Also elide the name in the declaration?</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"><br>=C2=A0 </span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">~()</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">{</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"> </span><span style=3D"color: #800;" class=3D"styled-by-pr=
ettify">/* Now it really can't get any shorter. */</span><span style=3D=
"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">}</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify"><br></span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">};</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"><br></span></div></code></div><br><br><br>On Tuesday, August 23=
, 2016 at 12:52:06 AM UTC+2, gmis...@gmail.com wrote:<blockquote class=3D"g=
mail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc sol=
id;padding-left: 1ex;"><div dir=3D"ltr"><div><br></div><div>Is their as muc=
h value proposal now that we have editors and IDE's that are getting so=
good at renaming?</div><div><br></div><div>I don't know if 'this&#=
39; would work for your purposes, though I doubt it. Perhaps we could also =
introduce a 'self' keyword. And that could be=C2=A0used here, thoug=
h I'd kind of like that to=C2=A0work like 'this' but be a refer=
ence (or=C2=A0use _ maybe).</div><div><br><br>On Tuesday, August 23, 2016 a=
t 4:12:07 AM UTC+12, <a>btc...@gmail.com</a> wrote:</div><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;border-=
left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">=
<div dir=3D"ltr">I apologize if an idea like this has been discussed/reject=
ed before, I have not found a relevant discussion.<br>Are there any compell=
ing reasons that retyping the class name should be required for ctors etc. =
?<br><br>I propose allowing '<span style=3D"font-family:courier new,mon=
ospace">auto</span>' in place of the class name.<br><br><div style=3D"b=
order:1px solid rgb(187,187,187);background-color:rgb(250,250,250)"><code><=
div><span style=3D"color:rgb(0,0,136)">template</span><span style=3D"color:=
rgb(102,102,0)"><</span><span style=3D"color:rgb(0,0,136)">class</span><=
span style=3D"color:rgb(0,0,0)"> T</span><span style=3D"color:rgb(102,102,0=
)">></span><span style=3D"color:rgb(0,0,0)"><br></span><span style=3D"co=
lor:rgb(0,0,136)">class</span><span style=3D"color:rgb(0,0,0)"> </span><spa=
n style=3D"color:rgb(102,0,102)">SomeLongClassName</span><span style=3D"col=
or:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,102,0)">{</span><span s=
tyle=3D"color:rgb(0,0,0)"><br></span><span style=3D"color:rgb(0,0,136)">pub=
lic</span><span style=3D"color:rgb(102,102,0)">:</span><span style=3D"color=
:rgb(0,0,0)"><br>=C2=A0 =C2=A0 </span><span style=3D"color:rgb(136,0,0)">//=
Short and readable</span><span style=3D"color:rgb(0,0,0)"><br>=C2=A0 =C2=
=A0 </span><span style=3D"color:rgb(0,0,136)">auto</span><span style=3D"col=
or:rgb(102,102,0)">&</span><span style=3D"color:rgb(0,0,0)"> </span><sp=
an style=3D"color:rgb(0,0,136)">operator</span><span style=3D"color:rgb(0,0=
,0)"> </span><span style=3D"color:rgb(102,102,0)">=3D</span><span style=3D"=
color:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,102,0)">(</span><spa=
n style=3D"color:rgb(0,0,136)">const</span><span style=3D"color:rgb(0,0,0)"=
> </span><span style=3D"color:rgb(0,0,136)">auto</span><span style=3D"color=
:rgb(102,102,0)">&</span><span style=3D"color:rgb(0,0,0)"> other</span>=
<span style=3D"color:rgb(102,102,0)">)</span><span style=3D"color:rgb(0,0,0=
)"> </span><span style=3D"color:rgb(102,102,0)">{</span><span style=3D"colo=
r:rgb(136,0,0)">/*...*/</span><span style=3D"color:rgb(102,102,0)">}</span>=
<span style=3D"color:rgb(0,0,0)"><br></span><span style=3D"color:rgb(102,10=
2,0)">};</span><span style=3D"color:rgb(0,0,0)"><br><br></span><span style=
=3D"color:rgb(102,0,102)">SomeLongClassName</span><span style=3D"color:rgb(=
102,102,0)"><</span><span style=3D"color:rgb(0,0,136)">long</span><span =
style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(0,0,136)">long<=
/span><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(0,0=
,136)">double</span><span style=3D"color:rgb(102,102,0)">></span><span s=
tyle=3D"color:rgb(0,0,0)"> a</span><span style=3D"color:rgb(102,102,0)">;</=
span><span style=3D"color:rgb(0,0,0)"><br>a</span><span style=3D"color:rgb(=
102,102,0)">.~</span><span style=3D"color:rgb(0,0,136)">auto</span><span st=
yle=3D"color:rgb(102,102,0)">();</span><span style=3D"color:rgb(0,0,0)"> </=
span><span style=3D"color:rgb(136,0,0)">// Nice and short</span><span style=
=3D"color:rgb(0,0,0)"><br><br></span><span style=3D"color:rgb(136,0,0)">// =
Allows for special member functions in anonymous classes</span><span style=
=3D"color:rgb(0,0,0)"><br></span><span style=3D"color:rgb(0,0,136)">class</=
span><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,=
102,0)">{</span><span style=3D"color:rgb(0,0,0)"><br>=C2=A0 =C2=A0 </span><=
span style=3D"color:rgb(0,0,136)">auto</span><span style=3D"color:rgb(102,1=
02,0)">()</span><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"col=
or:rgb(102,102,0)">{</span><span style=3D"color:rgb(136,0,0)">/*...*/</span=
><span style=3D"color:rgb(102,102,0)">}</span><span style=3D"color:rgb(0,0,=
0)"><br>=C2=A0 =C2=A0 </span><span style=3D"color:rgb(0,0,136)">auto</span>=
<span style=3D"color:rgb(102,102,0)">&</span><span style=3D"color:rgb(0=
,0,0)"> </span><span style=3D"color:rgb(0,0,136)">operator</span><span styl=
e=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,102,0)">=3D</sp=
an><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,10=
2,0)">(</span><span style=3D"color:rgb(0,0,136)">auto</span><span style=3D"=
color:rgb(102,102,0)">&&</span><span style=3D"color:rgb(0,0,0)"> ot=
her</span><span style=3D"color:rgb(102,102,0)">)</span><span style=3D"color=
:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,102,0)">{</span><span sty=
le=3D"color:rgb(136,0,0)">/*...*/</span><span style=3D"color:rgb(102,102,0)=
">}</span><span style=3D"color:rgb(0,0,0)"><br>=C2=A0 =C2=A0 </span><span s=
tyle=3D"color:rgb(102,102,0)">~</span><span style=3D"color:rgb(0,0,136)">au=
to</span><span style=3D"color:rgb(102,102,0)">()</span><span style=3D"color=
:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,102,0)">{</span><span sty=
le=3D"color:rgb(136,0,0)">/*...*/</span><span style=3D"color:rgb(102,102,0)=
">}</span><span style=3D"color:rgb(0,0,0)"><br></span><span style=3D"color:=
rgb(102,102,0)">};</span><span style=3D"color:rgb(0,0,0)"><br></span></div>=
</code></div><br>Since I have zero experience with proposals, I would just =
like to know if a change like this could be benefitial, or is complete nons=
ense.<br><br>Kind regards,<br>Patrick<br></div></blockquote></div></blockqu=
ote></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/e54c473d-3a5f-4c8e-b4cc-3a5cdecad978%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/e54c473d-3a5f-4c8e-b4cc-3a5cdecad978=
%40isocpp.org</a>.<br />
------=_Part_5308_1757731992.1471941973852--
------=_Part_5307_929331334.1471941973850--
.
Author: "D. B." <db0451@gmail.com>
Date: Tue, 23 Aug 2016 09:55:07 +0100
Raw View
--001a1147284e53b142053ab95254
Content-Type: text/plain; charset=UTF-8
On Tue, Aug 23, 2016 at 9:31 AM, 'Johannes Schaub' via ISO C++ Standard -
Future Proposals <std-proposals@isocpp.org> wrote:
> INBO (in my bikeshed opinion), "class" seems an appealing choice here. For
> symmetry, "struct" and union (for unions) should be allowed aswell.
>
I thought that, but then, rather than worry about symmetry, there are
already cases where symmetry is broken between *class* and the others, so
why not more?
However...
> For operator=, there is an ambiguity with elaborated type specifiers though
>
> R operator=(class paramname);
>
> Can aswell mean that it has an unnamed parameter of type "paramname".
>
Thanks, this is a full-on ambiguity in the grammar, rather than the mere
extreme human confusion I pointed out. :D I don't think *class c*an work,
then.
*typename* is out, for reasons I hope everyone already agrees with...
*decltype* seems like the best of the original set to me.
The new *self_t* would be reasonable, if not for the fact that I suspect
various people hailing from other languages or looking for shortcuts have
already defined it in their own projects... leading presumably to
redefinition errors. Also, how much the Committee hate adding keywords ;-)
especially when we've not ruled out repurposing an existing one yet.
I kinda hope this can be made to work somehow now, though, as it's made me
think about how it'll speed up refactoring, heh.
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhGyG0jqS_sNLURzPa2fdHDkfOXRw9xUhpbviMTCX%3DzBNw%40mail.gmail.com.
--001a1147284e53b142053ab95254
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, Aug 23, 2016 at 9:31 AM, 'Johannes Schaub' via ISO C++ Standard=
- Future Proposals <span dir=3D"ltr"><<a href=3D"mailto:std-proposals@i=
socpp.org" target=3D"_blank">std-proposals@isocpp.org</a>></span> wrote:=
<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-lef=
t:1px #ccc solid;padding-left:1ex"><p dir=3D"ltr">INBO (in my bikeshed opin=
ion), "class" seems an appealing choice here. For symmetry, "=
;struct" and union (for unions) should be allowed aswell.</p></blockqu=
ote><div>I thought that, but then, rather than worry about symmetry, there =
are already cases where symmetry is broken between <i>class</i> and the oth=
ers, so why not more?<br><br><br></div><div>However...</div><blockquote cla=
ss=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pa=
dding-left:1ex">
<p dir=3D"ltr">For operator=3D, there is an ambiguity with elaborated type =
specifiers though</p>
<p dir=3D"ltr">=C2=A0=C2=A0=C2=A0 R operator=3D(class paramname);</p>
<p dir=3D"ltr">Can aswell mean that it has an unnamed parameter of type &qu=
ot;paramname".</p>
</blockquote><div>Thanks, this is a full-on ambiguity in the grammar, rathe=
r than the mere extreme human confusion I pointed out. :D I don't think=
<i>class c</i>an work, then.<br><br></div><div><i>typename</i> is out, for=
reasons I hope everyone already agrees with... <i>decltype</i> seems like =
the best of the original set to me.<br><br></div><div>The new <i>self_t</i>=
would be reasonable, if not for the fact that I suspect various people hai=
ling from other languages or looking for shortcuts have already defined it =
in their own projects... leading presumably to redefinition errors. Also, h=
ow much the Committee hate adding keywords ;-) especially when we've no=
t ruled out repurposing an existing one yet.<br><br></div><div>I kinda hope=
this can be made to work somehow now, though, as it's made me think ab=
out how it'll speed up refactoring, heh.<br><br></div><div><br></div></=
div><br></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CACGiwhGyG0jqS_sNLURzPa2fdHDkfOXRw9xU=
hpbviMTCX%3DzBNw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACGiwhGyG0jqS_=
sNLURzPa2fdHDkfOXRw9xUhpbviMTCX%3DzBNw%40mail.gmail.com</a>.<br />
--001a1147284e53b142053ab95254--
.
Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Tue, 23 Aug 2016 12:37:02 +0300
Raw View
On 23 August 2016 at 11:31, 'Johannes Schaub' via ISO C++ Standard -
Future Proposals <std-proposals@isocpp.org> wrote:
> INBO (in my bikeshed opinion), "class" seems an appealing choice here. For
> symmetry, "struct" and union (for unions) should be allowed aswell.
IMBO the status quo is far superior to all of this irrelevant nonsense.
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAFk2RUY1Fwrd7B-Ajagf_RvZ%3DW1mq2TQHVp-VezvtUWiCeyyhw%40mail.gmail.com.
.
Author: Bryce Glover <randomdsdevel@gmail.com>
Date: Tue, 23 Aug 2016 19:04:48 -0400
Raw View
--Apple-Mail=_B6A9E82F-332E-4314-89EF-CA237333D2AE
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8
> Thiago Macieira <thiago@macieira.org <mailto:thiago@macieira.org>>: Aug 2=
2 09:49PM -0700=20
>=20
> On segunda-feira, 22 de agosto de 2016 18:56:02 PDT Bryce Glover wrote:
> > Wouldn=E2=80=99t `(decltype(*this))&` (parentheses added just in case) =
work today,
> > or am I mistaken?
> =20
> It wouldn't because you're not allowed to use "this" in that context.
> =20
> --=20
> Thiago Macieira - thiago (AT) macieira.info <http://macieira.info/> - thi=
ago (AT) kde.org <http://kde.org/>
> Software Architect - Intel Open Source Technology Center
Please forgive my na=C3=AFve ignorance in this area, then. =20
=E2=80=94=E2=80=89Bryce Glover
=E3=80=80=E2=80=89RandomDSdevel@gmail.com
--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/8AA95B1E-CA36-47AE-BE48-13C7FB7970CE%40gmail.com=
..
--Apple-Mail=_B6A9E82F-332E-4314-89EF-CA237333D2AE
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8
<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dutf-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: s=
pace; -webkit-line-break: after-white-space;" class=3D""><blockquote type=
=3D"cite" class=3D""><span style=3D"font-family: arial; background-color: r=
gb(255, 255, 255); color: rgb(177, 176, 176); font-size: 15px;" class=3D"">=
Thiago Macieira <<a href=3D"mailto:thiago@macieira.org" class=3D"">thiag=
o@macieira.org</a>>: Aug 22 09:49PM -0700 </span><span style=3D"col=
or: rgb(46, 46, 46); font-family: arial; font-size: medium; background-colo=
r: rgb(255, 255, 255);" class=3D""></span><br style=3D"color: rgb(46, 46, 4=
6); font-family: arial; background-color: rgb(255, 255, 255);" class=3D""><=
br style=3D"color: rgb(46, 46, 46); font-family: arial; background-color: r=
gb(255, 255, 255);" class=3D""><span style=3D"color: rgb(46, 46, 46); font-=
family: arial; font-size: medium; background-color: rgb(255, 255, 255);" cl=
ass=3D"">On segunda-feira, 22 de agosto de 2016 18:56:02 PDT Bryce Glover w=
rote:</span><br style=3D"color: rgb(46, 46, 46); font-family: arial; backgr=
ound-color: rgb(255, 255, 255);" class=3D""><span style=3D"color: rgb(46, 4=
6, 46); font-family: arial; font-size: medium; background-color: rgb(255, 2=
55, 255);" class=3D"">> Wouldn=E2=80=99t `(decltype(*this))&` (paren=
theses added just in case) work today,</span><br style=3D"color: rgb(46, 46=
, 46); font-family: arial; background-color: rgb(255, 255, 255);" class=3D"=
"><span style=3D"color: rgb(46, 46, 46); font-family: arial; font-size: med=
ium; background-color: rgb(255, 255, 255);" class=3D"">> or am I mistake=
n?</span><br style=3D"color: rgb(46, 46, 46); font-family: arial; backgroun=
d-color: rgb(255, 255, 255);" class=3D""><span style=3D"color: rgb(46, 46, =
46); font-family: arial; font-size: medium; background-color: rgb(255, 255,=
255);" class=3D""> </span><br style=3D"color: rgb(46, 46, 46); font-f=
amily: arial; background-color: rgb(255, 255, 255);" class=3D""><span style=
=3D"color: rgb(46, 46, 46); font-family: arial; font-size: medium; backgrou=
nd-color: rgb(255, 255, 255);" class=3D"">It wouldn't because you're not al=
lowed to use "this" in that context.</span><br style=3D"color: rgb(46, 46, =
46); font-family: arial; background-color: rgb(255, 255, 255);" class=3D"">=
<span style=3D"color: rgb(46, 46, 46); font-family: arial; font-size: mediu=
m; background-color: rgb(255, 255, 255);" class=3D""> </span><br style=
=3D"color: rgb(46, 46, 46); font-family: arial; background-color: rgb(255, =
255, 255);" class=3D""><span style=3D"color: rgb(46, 46, 46); font-family: =
arial; font-size: medium; background-color: rgb(255, 255, 255);" class=3D""=
>-- </span><br style=3D"color: rgb(46, 46, 46); font-family: arial; ba=
ckground-color: rgb(255, 255, 255);" class=3D""><span style=3D"color: rgb(4=
6, 46, 46); font-family: arial; font-size: medium; background-color: rgb(25=
5, 255, 255);" class=3D"">Thiago Macieira - thiago (AT) </span><a href=
=3D"http://macieira.info" style=3D"font-family: arial; background-color: rg=
b(255, 255, 255);" class=3D"">macieira.info</a><span style=3D"color: rgb(46=
, 46, 46); font-family: arial; font-size: medium; background-color: rgb(255=
, 255, 255);" class=3D""> - thiago (AT) </span><a href=3D"http://=
kde.org" style=3D"font-family: arial; background-color: rgb(255, 255, 255);=
" class=3D"">kde.org</a><br style=3D"color: rgb(46, 46, 46); font-family: a=
rial; background-color: rgb(255, 255, 255);" class=3D""><span style=3D"colo=
r: rgb(46, 46, 46); font-family: arial; font-size: medium; background-color=
: rgb(255, 255, 255);" class=3D"">Software Architect - Intel Open Source Te=
chnology Center</span></blockquote><br class=3D""><div class=3D"">Please fo=
rgive my na=C3=AFve ignorance in this area, then. </div><br class=3D"=
"><div class=3D"">
<div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; t=
ext-align: start; text-indent: 0px; text-transform: none; white-space: norm=
al; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-w=
rap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-=
space;" class=3D""><div style=3D"color: rgb(0, 0, 0); letter-spacing: norma=
l; orphans: auto; text-align: start; text-indent: 0px; text-transform: none=
; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke=
-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-=
break: after-white-space;" class=3D""><div class=3D"">=E2=80=94=E2=80=89Bry=
ce Glover</div><div class=3D"">=E3=80=80=E2=80=89<a href=3D"mailto:RandomDS=
devel@gmail.com" class=3D"">RandomDSdevel@gmail.com</a></div></div></div></=
div></body></html>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/8AA95B1E-CA36-47AE-BE48-13C7FB7970CE%=
40gmail.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/8AA95B1E-CA36-47AE-BE48-13C7FB7970CE%=
40gmail.com</a>.<br />
--Apple-Mail=_B6A9E82F-332E-4314-89EF-CA237333D2AE--
.
Author: Tony V E <tvaneerd@gmail.com>
Date: Tue, 23 Aug 2016 19:32:02 -0400
Raw View
<html><head></head><body lang=3D"en-US" style=3D"background-color: rgb(255,=
255, 255); line-height: initial;"> =
<div style=3D"width: 100%; fo=
nt-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif=
; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, =
255, 255);">There's no reason to make it easier to explicitly call a destru=
ctor. It is not something you do very often. </div> =
=
<div style=3D"width: 100%; font-size: ini=
tial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb=
(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);">=
<br style=3D"display:initial"></div> =
=
=
<div style=3D"font-size: initial; font-family: Calibri, 'Slate Pro', =
sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; backg=
round-color: rgb(255, 255, 255);">Sent from my BlackBerry&nb=
sp;portable Babbage Device</div> =
=
<tabl=
e width=3D"100%" style=3D"background-color:white;border-spacing:0px;"> <tbo=
dy><tr><td colspan=3D"2" style=3D"font-size: initial; text-align: initial; =
background-color: rgb(255, 255, 255);"> <div styl=
e=3D"border-style: solid none none; border-top-color: rgb(181, 196, 223); b=
order-top-width: 1pt; padding: 3pt 0in 0in; font-family: Tahoma, 'BB Alpha =
Sans', 'Slate Pro'; font-size: 10pt;"> <div><b>From: </b>btcrtn@gmail.com<=
/div><div><b>Sent: </b>Tuesday, August 23, 2016 4:46 AM</div><div><b>To: </=
b>ISO C++ Standard - Future Proposals</div><div><b>Reply To: </b>std-propos=
als@isocpp.org</div><div><b>Subject: </b>[std-proposals] Re: About the nami=
ng of special member functions</div></div></td></tr></tbody></table><div st=
yle=3D"border-style: solid none none; border-top-color: rgb(186, 188, 209);=
border-top-width: 1pt; font-size: initial; text-align: initial; background=
-color: rgb(255, 255, 255);"></div><br><div id=3D"_originalContent" style=
=3D""><div dir=3D"ltr"><span style=3D"background-color: rgb(255, 255, 255);=
"><span style=3D"color: rgb(0, 0, 0);"><span style=3D"font-family: arial,sa=
ns-serif;">If <span style=3D"color: rgb(0, 0, 255);"><span style=3D"font-fa=
mily: courier new,monospace;">class</span></span> introduces too many issue=
s, the compiler could define <span style=3D"color: rgb(0, 0, 255);"><span s=
tyle=3D"font-family: courier new,monospace;">self_t</span></span> to mean t=
he type of the enclosing class, which would not be too hard I imagine.<br><=
br></span></span></span><div class=3D"prettyprint" style=3D"background-colo=
r: rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-style: soli=
d; border-width: 1px; word-wrap: break-word;"><code class=3D"prettyprint"><=
div class=3D"subprettyprint"><span style=3D"color: #008;" class=3D"styled-b=
y-prettify">template</span><span style=3D"color: #660;" class=3D"styled-by-=
prettify"><</span><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">class</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
T</span><span style=3D"color: #660;" class=3D"styled-by-prettify">></spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></span><spa=
n style=3D"color: #008;" class=3D"styled-by-prettify">class</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"col=
or: #606;" class=3D"styled-by-prettify">SomeClass</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;"=
class=3D"styled-by-prettify">{</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"><br> </span><span style=3D"color: #800;" class=
=3D"styled-by-prettify">// Make the compiler do something like this implici=
tly.</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>&n=
bsp; </span><span style=3D"color: #008;" class=3D"styled-by-prettify">using=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> self_t </=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #606;" class=3D"styled-by-prettify">SomeClass</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">;</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"><br> <br> </span><span sty=
le=3D"color: #800;" class=3D"styled-by-prettify">// I think this looks nice=
..</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br> =
; self_t</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(<=
/span><span style=3D"color: #008;" class=3D"styled-by-prettify">int</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> a</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;=
" class=3D"styled-by-prettify">int</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> b</span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">);</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"><br> self_t</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">()</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">:<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"> self_t</sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span =
style=3D"color: #066;" class=3D"styled-by-prettify">42</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #066;" cla=
ss=3D"styled-by-prettify">1337</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">)</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">{}</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>&n=
bsp; self_t</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>&</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </s=
pan><span style=3D"color: #008;" class=3D"styled-by-prettify">operator</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D=
"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #008;" cla=
ss=3D"styled-by-prettify">const</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"> self_t</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">&</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">);</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=
<br> </span><span style=3D"color: #800;" class=3D"styled-by-prettify"=
>// Should 'self_t' be 'SomeClass<T>' or 'SomeClass', allowing the fo=
llowing?</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><b=
r> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">t=
emplate</span><span style=3D"color: #660;" class=3D"styled-by-prettify"><=
;</span><span style=3D"color: #008;" class=3D"styled-by-prettify">class</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"> U</span><span=
style=3D"color: #660;" class=3D"styled-by-prettify">></span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br> self_t</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">&</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"col=
or: #008;" class=3D"styled-by-prettify">operator</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">=3D</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">(</span><span style=3D"color: #008;" class=3D"styled-by-pret=
tify">const</span><span style=3D"color: #000;" class=3D"styled-by-prettify"=
> self_t</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&l=
t;</span><span style=3D"color: #000;" class=3D"styled-by-prettify">U</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">>&</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">);</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"><br><br> </span><span style=
=3D"color: #800;" class=3D"styled-by-prettify">// This is invalid right now=
.. Should be valid. Why whould it not be?</span><span style=3D"color: #000;"=
class=3D"styled-by-prettify"><br> </span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">~</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">self_t</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">();</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"><br></span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">};</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><=
br><br></span><span style=3D"color: #008;" class=3D"styled-by-prettify">cla=
ss</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">{</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify"><br> </span><span st=
yle=3D"color: #008;" class=3D"styled-by-prettify">using</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> self_t </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">???;</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"> </span><span style=3D"color: #800;" class=3D"styl=
ed-by-prettify">// Can't be done right now.</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #660;" cl=
ass=3D"styled-by-prettify">};</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"><br></span></div></code></div><br>How to handle calling =
the destructor?<br><br><div class=3D"prettyprint" style=3D"background-color=
: rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-style: solid=
; border-width: 1px; word-wrap: break-word;"><code class=3D"prettyprint"><d=
iv class=3D"subprettyprint"><span style=3D"color: #000;" class=3D"styled-by=
-prettify"><br></span><span style=3D"color: #008;" class=3D"styled-by-prett=
ify">class</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
C </span><span style=3D"color: #660;" class=3D"styled-by-prettify">{</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"><br> </spa=
n><span style=3D"color: #008;" class=3D"styled-by-prettify">template</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify"><</span><span =
style=3D"color: #008;" class=3D"styled-by-prettify">class</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> T</span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">></span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"><br> </span><span style=3D"color: #0=
08;" class=3D"styled-by-prettify">void</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> destroy</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">(</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify">T</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">&</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">object=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">)</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">{</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"><br> </span><span style=
=3D"color: #800;" class=3D"styled-by-prettify">// Confusing use of 'self_t'=
? Is it 'T' or 'C'?</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"><br> </span><span style=3D"color: #008;" class=3D"sty=
led-by-prettify">object</span><span style=3D"color: #660;" class=3D"styled-=
by-prettify">.~</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify">self_t</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>();</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>&n=
bsp; </span><span style=3D"color: #800;" class=3D"styled-by-prettify=
">// Is the above an exception, or do we allow the following?</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"><br> </span=
><span style=3D"color: #008;" class=3D"styled-by-prettify">object</span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">.</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify">self_t another_object</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">;</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify"><br> </span><=
span style=3D"color: #800;" class=3D"styled-by-prettify">// What if we drop=
the destructor name? What do we need it for anyway?</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"><br> </span><span st=
yle=3D"color: #008;" class=3D"styled-by-prettify">object</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">.~();</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"><br> </span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">}</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"><br> </span><span style=3D"color: #=
800;" class=3D"styled-by-prettify">// Also elide the name in the declaratio=
n?</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbs=
p; </span><span style=3D"color: #660;" class=3D"styled-by-prettify">~()</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span =
style=3D"color: #660;" class=3D"styled-by-prettify">{</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #8=
00;" class=3D"styled-by-prettify">/* Now it really can't get any shorter. *=
/</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">}</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">};</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"><br></span></div></code></div><br><br><br=
>On Tuesday, August 23, 2016 at 12:52:06 AM UTC+2, gmis...@gmail.com 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><br></di=
v><div>Is their as much value proposal now that we have editors and IDE's t=
hat are getting so good at renaming?</div><div><br></div><div>I don't know =
if 'this' would work for your purposes, though I doubt it. Perhaps we could=
also introduce a 'self' keyword. And that could be used here, though =
I'd kind of like that to work like 'this' but be a reference (or =
use _ maybe).</div><div><br><br>On Tuesday, August 23, 2016 at 4:12:07 AM U=
TC+12, <a>btc...@gmail.com</a> wrote:</div><blockquote class=3D"gmail_quote=
" style=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(=
204,204,204);border-left-width:1px;border-left-style:solid"><div dir=3D"ltr=
">I apologize if an idea like this has been discussed/rejected before, I ha=
ve not found a relevant discussion.<br>Are there any compelling reasons tha=
t retyping the class name should be required for ctors etc. ?<br><br>I prop=
ose allowing '<span style=3D"font-family:courier new,monospace">auto</span>=
' in place of the class name.<br><br><div style=3D"border:1px solid rgb(187=
,187,187);background-color:rgb(250,250,250)"><code><div><span style=3D"colo=
r:rgb(0,0,136)">template</span><span style=3D"color:rgb(102,102,0)"><</s=
pan><span style=3D"color:rgb(0,0,136)">class</span><span style=3D"color:rgb=
(0,0,0)"> T</span><span style=3D"color:rgb(102,102,0)">></span><span sty=
le=3D"color:rgb(0,0,0)"><br></span><span style=3D"color:rgb(0,0,136)">class=
</span><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(10=
2,0,102)">SomeLongClassName</span><span style=3D"color:rgb(0,0,0)"> </span>=
<span style=3D"color:rgb(102,102,0)">{</span><span style=3D"color:rgb(0,0,0=
)"><br></span><span style=3D"color:rgb(0,0,136)">public</span><span style=
=3D"color:rgb(102,102,0)">:</span><span style=3D"color:rgb(0,0,0)"><br>&nbs=
p; </span><span style=3D"color:rgb(136,0,0)">// Short and readable</=
span><span style=3D"color:rgb(0,0,0)"><br> </span><span style=
=3D"color:rgb(0,0,136)">auto</span><span style=3D"color:rgb(102,102,0)">&am=
p;</span><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(=
0,0,136)">operator</span><span style=3D"color:rgb(0,0,0)"> </span><span sty=
le=3D"color:rgb(102,102,0)">=3D</span><span style=3D"color:rgb(0,0,0)"> </s=
pan><span style=3D"color:rgb(102,102,0)">(</span><span style=3D"color:rgb(0=
,0,136)">const</span><span style=3D"color:rgb(0,0,0)"> </span><span style=
=3D"color:rgb(0,0,136)">auto</span><span style=3D"color:rgb(102,102,0)">&am=
p;</span><span style=3D"color:rgb(0,0,0)"> other</span><span style=3D"color=
:rgb(102,102,0)">)</span><span style=3D"color:rgb(0,0,0)"> </span><span sty=
le=3D"color:rgb(102,102,0)">{</span><span style=3D"color:rgb(136,0,0)">/*..=
..*/</span><span style=3D"color:rgb(102,102,0)">}</span><span style=3D"color=
:rgb(0,0,0)"><br></span><span style=3D"color:rgb(102,102,0)">};</span><span=
style=3D"color:rgb(0,0,0)"><br><br></span><span style=3D"color:rgb(102,0,1=
02)">SomeLongClassName</span><span style=3D"color:rgb(102,102,0)"><</spa=
n><span style=3D"color:rgb(0,0,136)">long</span><span style=3D"color:rgb(0,=
0,0)"> </span><span style=3D"color:rgb(0,0,136)">long</span><span style=3D"=
color:rgb(0,0,0)"> </span><span style=3D"color:rgb(0,0,136)">double</span><=
span style=3D"color:rgb(102,102,0)">></span><span style=3D"color:rgb(0,0=
,0)"> a</span><span style=3D"color:rgb(102,102,0)">;</span><span style=3D"c=
olor:rgb(0,0,0)"><br>a</span><span style=3D"color:rgb(102,102,0)">.~</span>=
<span style=3D"color:rgb(0,0,136)">auto</span><span style=3D"color:rgb(102,=
102,0)">();</span><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"c=
olor:rgb(136,0,0)">// Nice and short</span><span style=3D"color:rgb(0,0,0)"=
><br><br></span><span style=3D"color:rgb(136,0,0)">// Allows for special me=
mber functions in anonymous classes</span><span style=3D"color:rgb(0,0,0)">=
<br></span><span style=3D"color:rgb(0,0,136)">class</span><span style=3D"co=
lor:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,102,0)">{</span><span =
style=3D"color:rgb(0,0,0)"><br> </span><span style=3D"color:rg=
b(0,0,136)">auto</span><span style=3D"color:rgb(102,102,0)">()</span><span =
style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,102,0)">{</=
span><span style=3D"color:rgb(136,0,0)">/*...*/</span><span style=3D"color:=
rgb(102,102,0)">}</span><span style=3D"color:rgb(0,0,0)"><br> =
</span><span style=3D"color:rgb(0,0,136)">auto</span><span style=3D"color:r=
gb(102,102,0)">&</span><span style=3D"color:rgb(0,0,0)"> </span><span s=
tyle=3D"color:rgb(0,0,136)">operator</span><span style=3D"color:rgb(0,0,0)"=
> </span><span style=3D"color:rgb(102,102,0)">=3D</span><span style=3D"colo=
r:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,102,0)">(</span><span st=
yle=3D"color:rgb(0,0,136)">auto</span><span style=3D"color:rgb(102,102,0)">=
&&</span><span style=3D"color:rgb(0,0,0)"> other</span><span style=
=3D"color:rgb(102,102,0)">)</span><span style=3D"color:rgb(0,0,0)"> </span>=
<span style=3D"color:rgb(102,102,0)">{</span><span style=3D"color:rgb(136,0=
,0)">/*...*/</span><span style=3D"color:rgb(102,102,0)">}</span><span style=
=3D"color:rgb(0,0,0)"><br> </span><span style=3D"color:rgb(102=
,102,0)">~</span><span style=3D"color:rgb(0,0,136)">auto</span><span style=
=3D"color:rgb(102,102,0)">()</span><span style=3D"color:rgb(0,0,0)"> </span=
><span style=3D"color:rgb(102,102,0)">{</span><span style=3D"color:rgb(136,=
0,0)">/*...*/</span><span style=3D"color:rgb(102,102,0)">}</span><span styl=
e=3D"color:rgb(0,0,0)"><br></span><span style=3D"color:rgb(102,102,0)">};</=
span><span style=3D"color:rgb(0,0,0)"><br></span></div></code></div><br>Sin=
ce I have zero experience with proposals, I would just like to know if a ch=
ange like this could be benefitial, or is complete nonsense.<br><br>Kind re=
gards,<br>Patrick<br></div></blockquote></div></blockquote></div>
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/e54c473d-3a5f-4c8e-b4cc-3a5cdecad978%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.goo=
gle.com/a/isocpp.org/d/msgid/std-proposals/e54c473d-3a5f-4c8e-b4cc-3a5cdeca=
d978%40isocpp.org</a>.<br>
<br><!--end of _originalContent --></div></body></html>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/20160823233202.4927569.38307.16135%40=
gmail.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com=
/a/isocpp.org/d/msgid/std-proposals/20160823233202.4927569.38307.16135%40gm=
ail.com</a>.<br />
.
Author: Patrice Roy <patricer@gmail.com>
Date: Tue, 23 Aug 2016 23:21:31 -0400
Raw View
--001a11425e4425d276053ac8c7c8
Content-Type: text/plain; charset=UTF-8
Overall, so far, all options proposed seem to me to be worse than the statu
quo. I'm not against the idea of simplifying writing code in such
situations, but I suggest we let this one rest until we find a more
suitable approach.
2016-08-23 19:32 GMT-04:00 Tony V E <tvaneerd@gmail.com>:
> There's no reason to make it easier to explicitly call a destructor. It is
> not something you do very often.
>
> Sent from my BlackBerry portable Babbage Device
> *From: *btcrtn@gmail.com
> *Sent: *Tuesday, August 23, 2016 4:46 AM
> *To: *ISO C++ Standard - Future Proposals
> *Reply To: *std-proposals@isocpp.org
> *Subject: *[std-proposals] Re: About the naming of special member
> functions
>
> If class introduces too many issues, the compiler could define self_t to
> mean the type of the enclosing class, which would not be too hard I imagine.
>
> template<class T>
> class SomeClass {
> // Make the compiler do something like this implicitly.
> using self_t = SomeClass;
>
> // I think this looks nice.
> self_t(int a, int b);
> self_t() : self_t(42, 1337) {}
> self_t& operator = (const self_t& );
>
> // Should 'self_t' be 'SomeClass<T>' or 'SomeClass', allowing the
> following?
> template<class U>
> self_t& operator = (const self_t<U>& );
>
> // This is invalid right now. Should be valid. Why whould it not be?
> ~self_t();
> };
>
> class {
> using self_t = ???; // Can't be done right now.
> };
>
> How to handle calling the destructor?
>
>
> class C {
> template<class T>
> void destroy(T& object) {
> // Confusing use of 'self_t'? Is it 'T' or 'C'?
> object.~self_t();
> // Is the above an exception, or do we allow the following?
> object.self_t another_object;
> // What if we drop the destructor name? What do we need it for anyway?
> object.~();
> }
> // Also elide the name in the declaration?
> ~() { /* Now it really can't get any shorter. */ }
> };
>
>
>
> On Tuesday, August 23, 2016 at 12:52:06 AM UTC+2, gmis...@gmail.com wrote:
>>
>>
>> Is their as much value proposal now that we have editors and IDE's that
>> are getting so good at renaming?
>>
>> I don't know if 'this' would work for your purposes, though I doubt it.
>> Perhaps we could also introduce a 'self' keyword. And that could be used
>> here, though I'd kind of like that to work like 'this' but be a reference
>> (or use _ maybe).
>>
>>
>> On Tuesday, August 23, 2016 at 4:12:07 AM UTC+12, btc...@gmail.com wrote:
>>
>>> I apologize if an idea like this has been discussed/rejected before, I
>>> have not found a relevant discussion.
>>> Are there any compelling reasons that retyping the class name should be
>>> required for ctors etc. ?
>>>
>>> I propose allowing 'auto' in place of the class name.
>>>
>>> template<class T>
>>> class SomeLongClassName {
>>> public:
>>> // Short and readable
>>> auto& operator = (const auto& other) {/*...*/}
>>> };
>>>
>>> SomeLongClassName<long long double> a;
>>> a.~auto(); // Nice and short
>>>
>>> // Allows for special member functions in anonymous classes
>>> class {
>>> auto() {/*...*/}
>>> auto& operator = (auto&& other) {/*...*/}
>>> ~auto() {/*...*/}
>>> };
>>>
>>> Since I have zero experience with proposals, I would just like to know
>>> if a change like this could be benefitial, or is complete nonsense.
>>>
>>> Kind regards,
>>> Patrick
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to std-proposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> To view this discussion on the web visit https://groups.google.com/a/
> isocpp.org/d/msgid/std-proposals/e54c473d-3a5f-4c8e-
> b4cc-3a5cdecad978%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/e54c473d-3a5f-4c8e-b4cc-3a5cdecad978%40isocpp.org?utm_medium=email&utm_source=footer>
> .
>
> --
> You received this message because you are subscribed to the Google Groups
> "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to std-proposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> To view this discussion on the web visit https://groups.google.com/a/
> isocpp.org/d/msgid/std-proposals/20160823233202.
> 4927569.38307.16135%40gmail.com
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/20160823233202.4927569.38307.16135%40gmail.com?utm_medium=email&utm_source=footer>
> .
>
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKiZDp1hVnEOwe7T0VB7NE6Cok%2BhKqNm4S8WQ2hwznvuRYQR-Q%40mail.gmail.com.
--001a11425e4425d276053ac8c7c8
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Overall, so far, all options proposed seem to me to be wor=
se than the statu quo. I'm not against the idea of simplifying writing =
code in such situations, but I suggest we let this one rest until we find a=
more suitable approach.<br></div><div class=3D"gmail_extra"><br><div class=
=3D"gmail_quote">2016-08-23 19:32 GMT-04:00 Tony V E <span dir=3D"ltr"><=
<a href=3D"mailto:tvaneerd@gmail.com" target=3D"_blank">tvaneerd@gmail.com<=
/a>></span>:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 =
..8ex;border-left:1px #ccc solid;padding-left:1ex"><div style=3D"background-=
color:rgb(255,255,255);line-height:initial" lang=3D"en-US"> =
<div =
style=3D"width:100%;font-size:initial;font-family:Calibri,'Slate Pro=
9;,sans-serif,sans-serif;color:rgb(31,73,125);text-align:initial;background=
-color:rgb(255,255,255)">There's no reason to make it easier to explici=
tly call a destructor. It is not something you do very often. </div> =
=
<div style=3D"width:100%=
;font-size:initial;font-family:Calibri,'Slate Pro',sans-serif,sans-=
serif;color:rgb(31,73,125);text-align:initial;background-color:rgb(255,255,=
255)"><br style=3D"display:initial"></div> =
=
=
<div style=3D"font-size:initial;font-family:Calibri,'Slate =
Pro',sans-serif,sans-serif;color:rgb(31,73,125);text-align:initial;back=
ground-color:rgb(255,255,255)">Sent=C2=A0from=C2=A0my=C2=A0BlackBerry=C2=A0=
<wbr>portable=C2=A0Babbage=C2=A0Device</div> =
=
<ta=
ble style=3D"background-color:white;border-spacing:0px" width=3D"100%"> <tb=
ody><tr><td colspan=3D"2" style=3D"font-size:initial;text-align:initial;bac=
kground-color:rgb(255,255,255)"> <div style=3D"bo=
rder-style:solid none none;border-top-color:rgb(181,196,223);border-top-wid=
th:1pt;padding:3pt 0in 0in;font-family:Tahoma,'BB Alpha Sans','=
Slate Pro';font-size:10pt"> <div><b>From: </b><a href=3D"mailto:btcrtn=
@gmail.com" target=3D"_blank">btcrtn@gmail.com</a></div><div><b>Sent: </b>T=
uesday, August 23, 2016 4:46 AM</div><div><b>To: </b>ISO C++ Standard - Fut=
ure Proposals</div><div><b>Reply To: </b><a href=3D"mailto:std-proposals@is=
ocpp.org" target=3D"_blank">std-proposals@isocpp.org</a></div><div><b>Subje=
ct: </b>[std-proposals] Re: About the naming of special member functions</d=
iv></div></td></tr></tbody></table><div><div class=3D"h5"><div style=3D"bor=
der-style:solid none none;border-top-color:rgb(186,188,209);border-top-widt=
h:1pt;font-size:initial;text-align:initial;background-color:rgb(255,255,255=
)"></div><br><div><div dir=3D"ltr"><span style=3D"background-color:rgb(255,=
255,255)"><span style=3D"color:rgb(0,0,0)"><span style=3D"font-family:arial=
,sans-serif">If <span style=3D"color:rgb(0,0,255)"><span style=3D"font-fami=
ly:courier new,monospace">class</span></span> introduces too many issues, t=
he compiler could define <span style=3D"color:rgb(0,0,255)"><span style=3D"=
font-family:courier new,monospace">self_t</span></span> to mean the type of=
the enclosing class, which would not be too hard I imagine.<br><br></span>=
</span></span><div style=3D"background-color:rgb(250,250,250);border-color:=
rgb(187,187,187);border-style:solid;border-width:1px;word-wrap:break-word">=
<code><div><span style=3D"color:#008">template</span><span style=3D"color:#=
660"><</span><span style=3D"color:#008">class</span><span style=3D"color=
:#000"> T</span><span style=3D"color:#660">></span><span style=3D"color:=
#000"><br></span><span style=3D"color:#008">class</span><span style=3D"colo=
r:#000"> </span><span style=3D"color:#606">SomeClass</span><span style=3D"c=
olor:#000"> </span><span style=3D"color:#660">{</span><span style=3D"color:=
#000"><br>=C2=A0 </span><span style=3D"color:#800">// Make the compiler do =
something like this implicitly.</span><span style=3D"color:#000"><br>=C2=A0=
</span><span style=3D"color:#008">using</span><span style=3D"color:#000"> =
self_t </span><span style=3D"color:#660">=3D</span><span style=3D"color:#00=
0"> </span><span style=3D"color:#606">SomeClass</span><span style=3D"color:=
#660">;</span><span style=3D"color:#000"><br>=C2=A0<br>=C2=A0 </span><span =
style=3D"color:#800">// I think this looks nice.</span><span style=3D"color=
:#000"><br>=C2=A0 self_t</span><span style=3D"color:#660">(</span><span sty=
le=3D"color:#008">int</span><span style=3D"color:#000"> a</span><span style=
=3D"color:#660">,</span><span style=3D"color:#000"> </span><span style=3D"c=
olor:#008">int</span><span style=3D"color:#000"> b</span><span style=3D"col=
or:#660">);</span><span style=3D"color:#000"><br>=C2=A0 self_t</span><span =
style=3D"color:#660">()</span><span style=3D"color:#000"> </span><span styl=
e=3D"color:#660">:</span><span style=3D"color:#000"> self_t</span><span sty=
le=3D"color:#660">(</span><span style=3D"color:#066">42</span><span style=
=3D"color:#660">,</span><span style=3D"color:#000"> </span><span style=3D"c=
olor:#066">1337</span><span style=3D"color:#660">)</span><span style=3D"col=
or:#000"> </span><span style=3D"color:#660">{}</span><span style=3D"color:#=
000"><br>=C2=A0 self_t</span><span style=3D"color:#660">&</span><span s=
tyle=3D"color:#000"> </span><span style=3D"color:#008">operator</span><span=
style=3D"color:#000"> </span><span style=3D"color:#660">=3D</span><span st=
yle=3D"color:#000"> </span><span style=3D"color:#660">(</span><span style=
=3D"color:#008">const</span><span style=3D"color:#000"> self_t</span><span =
style=3D"color:#660">&</span><span style=3D"color:#000"> </span><span s=
tyle=3D"color:#660">);</span><span style=3D"color:#000"><br><br>=C2=A0 </sp=
an><span style=3D"color:#800">// Should 'self_t' be 'SomeClass&=
lt;T>' or 'SomeClass', allowing the following?</span><span s=
tyle=3D"color:#000"><br>=C2=A0 </span><span style=3D"color:#008">template</=
span><span style=3D"color:#660"><</span><span style=3D"color:#008">class=
</span><span style=3D"color:#000"> U</span><span style=3D"color:#660">><=
/span><span style=3D"color:#000"><br>=C2=A0 self_t</span><span style=3D"col=
or:#660">&</span><span style=3D"color:#000"> </span><span style=3D"colo=
r:#008">operator</span><span style=3D"color:#000"> </span><span style=3D"co=
lor:#660">=3D</span><span style=3D"color:#000"> </span><span style=3D"color=
:#660">(</span><span style=3D"color:#008">const</span><span style=3D"color:=
#000"> self_t</span><span style=3D"color:#660"><</span><span style=3D"co=
lor:#000">U</span><span style=3D"color:#660">>&</span><span style=3D=
"color:#000"> </span><span style=3D"color:#660">);</span><span style=3D"col=
or:#000"><br><br>=C2=A0 </span><span style=3D"color:#800">// This is invali=
d right now. Should be valid. Why whould it not be?</span><span style=3D"co=
lor:#000"><br>=C2=A0 </span><span style=3D"color:#660">~</span><span style=
=3D"color:#000">self_t</span><span style=3D"color:#660">();</span><span sty=
le=3D"color:#000"><br></span><span style=3D"color:#660">};</span><span styl=
e=3D"color:#000"><br><br></span><span style=3D"color:#008">class</span><spa=
n style=3D"color:#000"> </span><span style=3D"color:#660">{</span><span sty=
le=3D"color:#000"><br>=C2=A0 </span><span style=3D"color:#008">using</span>=
<span style=3D"color:#000"> self_t </span><span style=3D"color:#660">=3D</s=
pan><span style=3D"color:#000"> </span><span style=3D"color:#660">???;</spa=
n><span style=3D"color:#000"> </span><span style=3D"color:#800">// Can'=
t be done right now.</span><span style=3D"color:#000"><br></span><span styl=
e=3D"color:#660">};</span><span style=3D"color:#000"><br></span></div></cod=
e></div><br>How to handle calling the destructor?<br><br><div style=3D"back=
ground-color:rgb(250,250,250);border-color:rgb(187,187,187);border-style:so=
lid;border-width:1px;word-wrap:break-word"><code><div><span style=3D"color:=
#000"><br></span><span style=3D"color:#008">class</span><span style=3D"colo=
r:#000"> C </span><span style=3D"color:#660">{</span><span style=3D"color:#=
000"><br>=C2=A0 </span><span style=3D"color:#008">template</span><span styl=
e=3D"color:#660"><</span><span style=3D"color:#008">class</span><span st=
yle=3D"color:#000"> T</span><span style=3D"color:#660">></span><span sty=
le=3D"color:#000"><br>=C2=A0 </span><span style=3D"color:#008">void</span><=
span style=3D"color:#000"> destroy</span><span style=3D"color:#660">(</span=
><span style=3D"color:#000">T</span><span style=3D"color:#660">&</span>=
<span style=3D"color:#000"> </span><span style=3D"color:#008">object</span>=
<span style=3D"color:#660">)</span><span style=3D"color:#000"> </span><span=
style=3D"color:#660">{</span><span style=3D"color:#000"><br>=C2=A0 =C2=A0 =
</span><span style=3D"color:#800">// Confusing use of 'self_t'? Is =
it 'T' or 'C'?</span><span style=3D"color:#000"><br>=C2=A0 =
=C2=A0 </span><span style=3D"color:#008">object</span><span style=3D"color:=
#660">.~</span><span style=3D"color:#000">self_t</span><span style=3D"color=
:#660">();</span><span style=3D"color:#000"><br>=C2=A0 =C2=A0 </span><span =
style=3D"color:#800">// Is the above an exception, or do we allow the follo=
wing?</span><span style=3D"color:#000"><br>=C2=A0 =C2=A0 </span><span style=
=3D"color:#008">object</span><span style=3D"color:#660">.</span><span style=
=3D"color:#000">self_t another_object</span><span style=3D"color:#660">;</s=
pan><span style=3D"color:#000"><br>=C2=A0 =C2=A0 </span><span style=3D"colo=
r:#800">// What if we drop the destructor name? What do we need it for anyw=
ay?</span><span style=3D"color:#000"><br>=C2=A0 =C2=A0 </span><span style=
=3D"color:#008">object</span><span style=3D"color:#660">.~();</span><span s=
tyle=3D"color:#000"><br>=C2=A0 </span><span style=3D"color:#660">}</span><s=
pan style=3D"color:#000"><br>=C2=A0 </span><span style=3D"color:#800">// Al=
so elide the name in the declaration?</span><span style=3D"color:#000"><br>=
=C2=A0 </span><span style=3D"color:#660">~()</span><span style=3D"color:#00=
0"> </span><span style=3D"color:#660">{</span><span style=3D"color:#000"> <=
/span><span style=3D"color:#800">/* Now it really can't get any shorter=
.. */</span><span style=3D"color:#000"> </span><span style=3D"color:#660">}<=
/span><span style=3D"color:#000"><br></span><span style=3D"color:#660">};</=
span><span style=3D"color:#000"><br></span></div></code></div><br><br><br>O=
n Tuesday, August 23, 2016 at 12:52:06 AM UTC+2, <a href=3D"mailto:gmis...@=
gmail.com" target=3D"_blank">gmis...@gmail.com</a> wrote:<blockquote class=
=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc s=
olid;padding-left:1ex"><div dir=3D"ltr"><div><br></div><div>Is their as muc=
h value proposal now that we have editors and IDE's that are getting so=
good at renaming?</div><div><br></div><div>I don't know if 'this&#=
39; would work for your purposes, though I doubt it. Perhaps we could also =
introduce a 'self' keyword. And that could be=C2=A0used here, thoug=
h I'd kind of like that to=C2=A0work like 'this' but be a refer=
ence (or=C2=A0use _ maybe).</div><div><br><br>On Tuesday, August 23, 2016 a=
t 4:12:07 AM UTC+12, <a>btc...@gmail.com</a> wrote:</div><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;border-=
left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">=
<div dir=3D"ltr">I apologize if an idea like this has been discussed/reject=
ed before, I have not found a relevant discussion.<br>Are there any compell=
ing reasons that retyping the class name should be required for ctors etc. =
?<br><br>I propose allowing '<span style=3D"font-family:courier new,mon=
ospace">auto</span>' in place of the class name.<br><br><div style=3D"b=
order:1px solid rgb(187,187,187);background-color:rgb(250,250,250)"><code><=
div><span style=3D"color:rgb(0,0,136)">template</span><span style=3D"color:=
rgb(102,102,0)"><</span><span style=3D"color:rgb(0,0,136)">class</span><=
span style=3D"color:rgb(0,0,0)"> T</span><span style=3D"color:rgb(102,102,0=
)">></span><span style=3D"color:rgb(0,0,0)"><br></span><span style=3D"co=
lor:rgb(0,0,136)">class</span><span style=3D"color:rgb(0,0,0)"> </span><spa=
n style=3D"color:rgb(102,0,102)">SomeLongClassName</span><span style=3D"col=
or:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,102,0)">{</span><span s=
tyle=3D"color:rgb(0,0,0)"><br></span><span style=3D"color:rgb(0,0,136)">pub=
lic</span><span style=3D"color:rgb(102,102,0)">:</span><span style=3D"color=
:rgb(0,0,0)"><br>=C2=A0 =C2=A0 </span><span style=3D"color:rgb(136,0,0)">//=
Short and readable</span><span style=3D"color:rgb(0,0,0)"><br>=C2=A0 =C2=
=A0 </span><span style=3D"color:rgb(0,0,136)">auto</span><span style=3D"col=
or:rgb(102,102,0)">&</span><span style=3D"color:rgb(0,0,0)"> </span><sp=
an style=3D"color:rgb(0,0,136)">operator</span><span style=3D"color:rgb(0,0=
,0)"> </span><span style=3D"color:rgb(102,102,0)">=3D</span><span style=3D"=
color:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,102,0)">(</span><spa=
n style=3D"color:rgb(0,0,136)">const</span><span style=3D"color:rgb(0,0,0)"=
> </span><span style=3D"color:rgb(0,0,136)">auto</span><span style=3D"color=
:rgb(102,102,0)">&</span><span style=3D"color:rgb(0,0,0)"> other</span>=
<span style=3D"color:rgb(102,102,0)">)</span><span style=3D"color:rgb(0,0,0=
)"> </span><span style=3D"color:rgb(102,102,0)">{</span><span style=3D"colo=
r:rgb(136,0,0)">/*...*/</span><span style=3D"color:rgb(102,102,0)">}</span>=
<span style=3D"color:rgb(0,0,0)"><br></span><span style=3D"color:rgb(102,10=
2,0)">};</span><span style=3D"color:rgb(0,0,0)"><br><br></span><span style=
=3D"color:rgb(102,0,102)">SomeLongClassName</span><span style=3D"color:rgb(=
102,102,0)"><</span><span style=3D"color:rgb(0,0,136)">long</span><span =
style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(0,0,136)">long<=
/span><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(0,0=
,136)">double</span><span style=3D"color:rgb(102,102,0)">></span><span s=
tyle=3D"color:rgb(0,0,0)"> a</span><span style=3D"color:rgb(102,102,0)">;</=
span><span style=3D"color:rgb(0,0,0)"><br>a</span><span style=3D"color:rgb(=
102,102,0)">.~</span><span style=3D"color:rgb(0,0,136)">auto</span><span st=
yle=3D"color:rgb(102,102,0)">();</span><span style=3D"color:rgb(0,0,0)"> </=
span><span style=3D"color:rgb(136,0,0)">// Nice and short</span><span style=
=3D"color:rgb(0,0,0)"><br><br></span><span style=3D"color:rgb(136,0,0)">// =
Allows for special member functions in anonymous classes</span><span style=
=3D"color:rgb(0,0,0)"><br></span><span style=3D"color:rgb(0,0,136)">class</=
span><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,=
102,0)">{</span><span style=3D"color:rgb(0,0,0)"><br>=C2=A0 =C2=A0 </span><=
span style=3D"color:rgb(0,0,136)">auto</span><span style=3D"color:rgb(102,1=
02,0)">()</span><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"col=
or:rgb(102,102,0)">{</span><span style=3D"color:rgb(136,0,0)">/*...*/</span=
><span style=3D"color:rgb(102,102,0)">}</span><span style=3D"color:rgb(0,0,=
0)"><br>=C2=A0 =C2=A0 </span><span style=3D"color:rgb(0,0,136)">auto</span>=
<span style=3D"color:rgb(102,102,0)">&</span><span style=3D"color:rgb(0=
,0,0)"> </span><span style=3D"color:rgb(0,0,136)">operator</span><span styl=
e=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,102,0)">=3D</sp=
an><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,10=
2,0)">(</span><span style=3D"color:rgb(0,0,136)">auto</span><span style=3D"=
color:rgb(102,102,0)">&&</span><span style=3D"color:rgb(0,0,0)"> ot=
her</span><span style=3D"color:rgb(102,102,0)">)</span><span style=3D"color=
:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,102,0)">{</span><span sty=
le=3D"color:rgb(136,0,0)">/*...*/</span><span style=3D"color:rgb(102,102,0)=
">}</span><span style=3D"color:rgb(0,0,0)"><br>=C2=A0 =C2=A0 </span><span s=
tyle=3D"color:rgb(102,102,0)">~</span><span style=3D"color:rgb(0,0,136)">au=
to</span><span style=3D"color:rgb(102,102,0)">()</span><span style=3D"color=
:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,102,0)">{</span><span sty=
le=3D"color:rgb(136,0,0)">/*...*/</span><span style=3D"color:rgb(102,102,0)=
">}</span><span style=3D"color:rgb(0,0,0)"><br></span><span style=3D"color:=
rgb(102,102,0)">};</span><span style=3D"color:rgb(0,0,0)"><br></span></div>=
</code></div><br>Since I have zero experience with proposals, I would just =
like to know if a change like this could be benefitial, or is complete nons=
ense.<br><br>Kind regards,<br>Patrick<br></div></blockquote></div></blockqu=
ote></div>
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_=
blank">std-proposals+unsubscribe@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/e54c473d-3a5f-4c8e-b4cc-3a5cdecad978%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/e54c=
473d-3a5f-4c8e-<wbr>b4cc-3a5cdecad978%40isocpp.org</a><wbr>.<br>
<br></div></div></div></div><div><div class=3D"h5">
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_=
blank">std-proposals+unsubscribe@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br></div></div>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/20160823233202.4927569.38307.16135%40=
gmail.com?utm_medium=3Demail&utm_source=3Dfooter" target=3D"_blank">htt=
ps://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/2016082=
3233202.<wbr>4927569.38307.16135%40gmail.<wbr>com</a>.<br>
</blockquote></div><br></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAKiZDp1hVnEOwe7T0VB7NE6Cok%2BhKqNm4S=
8WQ2hwznvuRYQR-Q%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKiZDp1hVnEOwe=
7T0VB7NE6Cok%2BhKqNm4S8WQ2hwznvuRYQR-Q%40mail.gmail.com</a>.<br />
--001a11425e4425d276053ac8c7c8--
.
Author: btcrtn@gmail.com
Date: Wed, 24 Aug 2016 01:11:48 -0700 (PDT)
Raw View
------=_Part_6025_1690251157.1472026308492
Content-Type: multipart/alternative;
boundary="----=_Part_6026_890534594.1472026308494"
------=_Part_6026_890534594.1472026308494
Content-Type: text/plain; charset=UTF-8
On Wednesday, August 24, 2016 at 5:21:34 AM UTC+2, Patrice Roy wrote:
>
> Overall, so far, all options proposed seem to me to be worse than the
> statu quo. I'm not against the idea of simplifying writing code in such
> situations, but I suggest we let this one rest until we find a more
> suitable approach.
>
> 2016-08-23 19:32 GMT-04:00 Tony V E <tvan...@gmail.com
> <javascript:void(0)>>:
>
>> There's no reason to make it easier to explicitly call a destructor. It
>> is not something you do very often.
>>
>> Sent from my BlackBerry portable Babbage Device
>> *From: *btc...@gmail.com <javascript:void(0)>
>> *Sent: *Tuesday, August 23, 2016 4:46 AM
>> *To: *ISO C++ Standard - Future Proposals
>> *Reply To: *std-pr...@isocpp.org <javascript:void(0)>
>> *Subject: *[std-proposals] Re: About the naming of special member
>> functions
>>
>> If class introduces too many issues, the compiler could define self_t to
>> mean the type of the enclosing class, which would not be too hard I imagine.
>>
>> template<class T>
>> class SomeClass {
>> // Make the compiler do something like this implicitly.
>> using self_t = SomeClass;
>>
>> // I think this looks nice.
>> self_t(int a, int b);
>> self_t() : self_t(42, 1337) {}
>> self_t& operator = (const self_t& );
>>
>> // Should 'self_t' be 'SomeClass<T>' or 'SomeClass', allowing the
>> following?
>> template<class U>
>> self_t& operator = (const self_t<U>& );
>>
>> // This is invalid right now. Should be valid. Why whould it not be?
>> ~self_t();
>> };
>>
>> class {
>> using self_t = ???; // Can't be done right now.
>> };
>>
>> How to handle calling the destructor?
>>
>>
>> class C {
>> template<class T>
>> void destroy(T& object) {
>> // Confusing use of 'self_t'? Is it 'T' or 'C'?
>> object.~self_t();
>> // Is the above an exception, or do we allow the following?
>> object.self_t another_object;
>> // What if we drop the destructor name? What do we need it for
>> anyway?
>> object.~();
>> }
>> // Also elide the name in the declaration?
>> ~() { /* Now it really can't get any shorter. */ }
>> };
>>
>>
>>
>> On Tuesday, August 23, 2016 at 12:52:06 AM UTC+2, gmis...@gmail.com
>> wrote:
>>>
>>>
>>> Is their as much value proposal now that we have editors and IDE's that
>>> are getting so good at renaming?
>>>
>>> I don't know if 'this' would work for your purposes, though I doubt it.
>>> Perhaps we could also introduce a 'self' keyword. And that could be used
>>> here, though I'd kind of like that to work like 'this' but be a reference
>>> (or use _ maybe).
>>>
>>>
>>> On Tuesday, August 23, 2016 at 4:12:07 AM UTC+12, btc...@gmail.com
>>> wrote:
>>>
>>>> I apologize if an idea like this has been discussed/rejected before, I
>>>> have not found a relevant discussion.
>>>> Are there any compelling reasons that retyping the class name should be
>>>> required for ctors etc. ?
>>>>
>>>> I propose allowing 'auto' in place of the class name.
>>>>
>>>> template<class T>
>>>> class SomeLongClassName {
>>>> public:
>>>> // Short and readable
>>>> auto& operator = (const auto& other) {/*...*/}
>>>> };
>>>>
>>>> SomeLongClassName<long long double> a;
>>>> a.~auto(); // Nice and short
>>>>
>>>> // Allows for special member functions in anonymous classes
>>>> class {
>>>> auto() {/*...*/}
>>>> auto& operator = (auto&& other) {/*...*/}
>>>> ~auto() {/*...*/}
>>>> };
>>>>
>>>> Since I have zero experience with proposals, I would just like to know
>>>> if a change like this could be benefitial, or is complete nonsense.
>>>>
>>>> Kind regards,
>>>> Patrick
>>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to std-proposal...@isocpp.org <javascript:void(0)>.
>> To post to this group, send email to std-pr...@isocpp.org
>> <javascript:void(0)>.
>> To view this discussion on the web visit
>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/e54c473d-3a5f-4c8e-b4cc-3a5cdecad978%40isocpp.org
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/e54c473d-3a5f-4c8e-b4cc-3a5cdecad978%40isocpp.org?utm_medium=email&utm_source=footer>
>> .
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to std-proposal...@isocpp.org <javascript:void(0)>.
>> To post to this group, send email to std-pr...@isocpp.org
>> <javascript:void(0)>.
>> To view this discussion on the web visit
>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/20160823233202.4927569.38307.16135%40gmail.com
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/20160823233202.4927569.38307.16135%40gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
Which problems do you see with the option that involves introducing a new
keyword, aside from introducing a new keyword?
On Wednesday, August 24, 2016 at 1:32:09 AM UTC+2, Tony V E wrote:
>
> There's no reason to make it easier to explicitly call a destructor. It is
> not something you do very often.
>
> Sent from my BlackBerry portable Babbage Device
> *From: *btc...@gmail.com
> *Sent: *Tuesday, August 23, 2016 4:46 AM
> *To: *ISO C++ Standard - Future Proposals
> *Reply To: *std-pr...@isocpp.org
> *Subject: *[std-proposals] Re: About the naming of special member
> functions
>
> If class introduces too many issues, the compiler could define self_t to
> mean the type of the enclosing class, which would not be too hard I imagine.
>
> template<class T>
> class SomeClass {
> // Make the compiler do something like this implicitly.
> using self_t = SomeClass;
>
> // I think this looks nice.
> self_t(int a, int b);
> self_t() : self_t(42, 1337) {}
> self_t& operator = (const self_t& );
>
> // Should 'self_t' be 'SomeClass<T>' or 'SomeClass', allowing the
> following?
> template<class U>
> self_t& operator = (const self_t<U>& );
>
> // This is invalid right now. Should be valid. Why whould it not be?
> ~self_t();
> };
>
> class {
> using self_t = ???; // Can't be done right now.
> };
>
> How to handle calling the destructor?
>
>
> class C {
> template<class T>
> void destroy(T& object) {
> // Confusing use of 'self_t'? Is it 'T' or 'C'?
> object.~self_t();
> // Is the above an exception, or do we allow the following?
> object.self_t another_object;
> // What if we drop the destructor name? What do we need it for anyway?
> object.~();
> }
> // Also elide the name in the declaration?
> ~() { /* Now it really can't get any shorter. */ }
> };
>
>
>
> On Tuesday, August 23, 2016 at 12:52:06 AM UTC+2, gmis...@gmail.com wrote:
>>
>>
>> Is their as much value proposal now that we have editors and IDE's that
>> are getting so good at renaming?
>>
>> I don't know if 'this' would work for your purposes, though I doubt it.
>> Perhaps we could also introduce a 'self' keyword. And that could be used
>> here, though I'd kind of like that to work like 'this' but be a reference
>> (or use _ maybe).
>>
>>
>> On Tuesday, August 23, 2016 at 4:12:07 AM UTC+12, btc...@gmail.com wrote:
>>
>>> I apologize if an idea like this has been discussed/rejected before, I
>>> have not found a relevant discussion.
>>> Are there any compelling reasons that retyping the class name should be
>>> required for ctors etc. ?
>>>
>>> I propose allowing 'auto' in place of the class name.
>>>
>>> template<class T>
>>> class SomeLongClassName {
>>> public:
>>> // Short and readable
>>> auto& operator = (const auto& other) {/*...*/}
>>> };
>>>
>>> SomeLongClassName<long long double> a;
>>> a.~auto(); // Nice and short
>>>
>>> // Allows for special member functions in anonymous classes
>>> class {
>>> auto() {/*...*/}
>>> auto& operator = (auto&& other) {/*...*/}
>>> ~auto() {/*...*/}
>>> };
>>>
>>> Since I have zero experience with proposals, I would just like to know
>>> if a change like this could be benefitial, or is complete nonsense.
>>>
>>> Kind regards,
>>> Patrick
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to std-proposal...@isocpp.org.
> To post to this group, send email to std-pr...@isocpp.org.
> To view this discussion on the web visit
> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/e54c473d-3a5f-4c8e-b4cc-3a5cdecad978%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/e54c473d-3a5f-4c8e-b4cc-3a5cdecad978%40isocpp.org?utm_medium=email&utm_source=footer>
> .
>
>
I understand that you don't regularly call the dtor explicitly. This was an
attempt to not introduce an strange case wrt the usage of self_t.
If you think it would be better, we can just not touch the dtor invokation
at all, since it's often done in templated functions anyways, like a.~T();.
Still, since a class can have only one dtor (aside from calling a base
class dtor via derived class instance, but why do that?), I thought about
just dropping the name and using ~ only, since there is nothing to
differentiate. Please correct me if this is wrong.
I thought about defining decltype to have the meaning of self_t when used
without a parameter. Unfortunately, problems arise.
Also, using this as self_t would also be more confusing than helpful the
way I see it.
class C {
// Ok, invalid right now.
decltype();
decltype& operator = (decltype&& other);
void f() {
int b; // Declares 'b' of type 'int'.
int(b); // Same as above.
decltype a; // Declares 'a' of type 'C'.
decltype(a); // Is this 'C' or the same as above?
decltype(b); // Is this 'int', or declare 'b' of type 'C'?
decltype(c); // Error or new variable?
}
};
At the moment, I think using a new keyword is the only sane way to make
this idea work.
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/87f0cac3-3f7c-4cb3-8170-57446751ec97%40isocpp.org.
------=_Part_6026_890534594.1472026308494
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On Wednesday, August 24, 2016 at 5:21:34 AM UTC+2, Patrice=
Roy wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left=
: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">Ov=
erall, so far, all options proposed seem to me to be worse than the statu q=
uo. I'm not against the idea of simplifying writing code in such situat=
ions, but I suggest we let this one rest until we find a more suitable appr=
oach.<br></div><div><br><div class=3D"gmail_quote">2016-08-23 19:32 GMT-04:=
00 Tony V E <span dir=3D"ltr"><<a href=3D"javascript:void(0)" target=3D"=
_blank" gdf-obfuscated-mailto=3D"4jPuGbCXDQAJ" rel=3D"nofollow" onmousedown=
=3D"this.href=3D'javascript:';return true;" onclick=3D"this.href=3D=
'javascript:';return true;">tvan...@gmail.com</a>></span>:<br><b=
lockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px =
#ccc solid;padding-left:1ex"><div style=3D"background-color:rgb(255,255,255=
);line-height:initial" lang=3D"en-US"> =
<div style=3D"width:100%;f=
ont-size:initial;font-family:Calibri,'Slate Pro',sans-serif,sans-se=
rif;color:rgb(31,73,125);text-align:initial;background-color:rgb(255,255,25=
5)">There's no reason to make it easier to explicitly call a destructor=
.. It is not something you do very often. </div> =
=
<div style=3D"width:100%;font-size:initial;fo=
nt-family:Calibri,'Slate Pro',sans-serif,sans-serif;color:rgb(31,73=
,125);text-align:initial;background-color:rgb(255,255,255)"><br style=3D"di=
splay:initial"></div> =
=
<div styl=
e=3D"font-size:initial;font-family:Calibri,'Slate Pro',sans-serif,s=
ans-serif;color:rgb(31,73,125);text-align:initial;background-color:rgb(255,=
255,255)">Sent=C2=A0from=C2=A0my=C2=A0BlackBerry=C2=A0<wbr>portable=C2=A0Ba=
bbage=C2=A0Device</div> =
=
<table style=3D"backgrou=
nd-color:white;border-spacing:0px" width=3D"100%"> <tbody><tr><td colspan=
=3D"2" style=3D"font-size:initial;text-align:initial;background-color:rgb(2=
55,255,255)"> <div style=3D"border-style:solid no=
ne none;border-top-color:rgb(181,196,223);border-top-width:1pt;padding:3pt =
0in 0in;font-family:Tahoma,'BB Alpha Sans','Slate Pro';font=
-size:10pt"> <div><b>From: </b><a href=3D"javascript:void(0)" target=3D"_b=
lank" gdf-obfuscated-mailto=3D"4jPuGbCXDQAJ" rel=3D"nofollow" onmousedown=
=3D"this.href=3D'javascript:';return true;" onclick=3D"this.href=3D=
'javascript:';return true;">btc...@gmail.com</a></div><div><b>Sent:=
</b>Tuesday, August 23, 2016 4:46 AM</div><div><b>To: </b>ISO C++ Standard=
- Future Proposals</div><div><b>Reply To: </b><a href=3D"javascript:void(0=
)" target=3D"_blank" gdf-obfuscated-mailto=3D"4jPuGbCXDQAJ" rel=3D"nofollow=
" onmousedown=3D"this.href=3D'javascript:';return true;" onclick=3D=
"this.href=3D'javascript:';return true;">std-pr...@isocpp.org</a></=
div><div><b>Subject: </b>[std-proposals] Re: About the naming of special me=
mber functions</div></div></td></tr></tbody></table><div><div><div style=3D=
"border-style:solid none none;border-top-color:rgb(186,188,209);border-top-=
width:1pt;font-size:initial;text-align:initial;background-color:rgb(255,255=
,255)"></div><br><div><div dir=3D"ltr"><span style=3D"background-color:rgb(=
255,255,255)"><span style=3D"color:rgb(0,0,0)"><span style=3D"font-family:a=
rial,sans-serif">If <span style=3D"color:rgb(0,0,255)"><span style=3D"font-=
family:courier new,monospace">class</span></span> introduces too many issue=
s, the compiler could define <span style=3D"color:rgb(0,0,255)"><span style=
=3D"font-family:courier new,monospace">self_t</span></span> to mean the typ=
e of the enclosing class, which would not be too hard I imagine.<br><br></s=
pan></span></span><div style=3D"background-color:rgb(250,250,250);border-co=
lor:rgb(187,187,187);border-style:solid;border-width:1px;word-wrap:break-wo=
rd"><code><div><span style=3D"color:#008">template</span><span style=3D"col=
or:#660"><</span><span style=3D"color:#008">class</span><span style=3D"c=
olor:#000"> T</span><span style=3D"color:#660">></span><span style=3D"co=
lor:#000"><br></span><span style=3D"color:#008">class</span><span style=3D"=
color:#000"> </span><span style=3D"color:#606">SomeClass</span><span style=
=3D"color:#000"> </span><span style=3D"color:#660">{</span><span style=3D"c=
olor:#000"><br>=C2=A0 </span><span style=3D"color:#800">// Make the compile=
r do something like this implicitly.</span><span style=3D"color:#000"><br>=
=C2=A0 </span><span style=3D"color:#008">using</span><span style=3D"color:#=
000"> self_t </span><span style=3D"color:#660">=3D</span><span style=3D"col=
or:#000"> </span><span style=3D"color:#606">SomeClass</span><span style=3D"=
color:#660">;</span><span style=3D"color:#000"><br>=C2=A0<br>=C2=A0 </span>=
<span style=3D"color:#800">// I think this looks nice.</span><span style=3D=
"color:#000"><br>=C2=A0 self_t</span><span style=3D"color:#660">(</span><sp=
an style=3D"color:#008">int</span><span style=3D"color:#000"> a</span><span=
style=3D"color:#660">,</span><span style=3D"color:#000"> </span><span styl=
e=3D"color:#008">int</span><span style=3D"color:#000"> b</span><span style=
=3D"color:#660">);</span><span style=3D"color:#000"><br>=C2=A0 self_t</span=
><span style=3D"color:#660">()</span><span style=3D"color:#000"> </span><sp=
an style=3D"color:#660">:</span><span style=3D"color:#000"> self_t</span><s=
pan style=3D"color:#660">(</span><span style=3D"color:#066">42</span><span =
style=3D"color:#660">,</span><span style=3D"color:#000"> </span><span style=
=3D"color:#066">1337</span><span style=3D"color:#660">)</span><span style=
=3D"color:#000"> </span><span style=3D"color:#660">{}</span><span style=3D"=
color:#000"><br>=C2=A0 self_t</span><span style=3D"color:#660">&</span>=
<span style=3D"color:#000"> </span><span style=3D"color:#008">operator</spa=
n><span style=3D"color:#000"> </span><span style=3D"color:#660">=3D</span><=
span style=3D"color:#000"> </span><span style=3D"color:#660">(</span><span =
style=3D"color:#008">const</span><span style=3D"color:#000"> self_t</span><=
span style=3D"color:#660">&</span><span style=3D"color:#000"> </span><s=
pan style=3D"color:#660">);</span><span style=3D"color:#000"><br><br>=C2=A0=
</span><span style=3D"color:#800">// Should 'self_t' be 'SomeC=
lass<T>' or 'SomeClass', allowing the following?</span><s=
pan style=3D"color:#000"><br>=C2=A0 </span><span style=3D"color:#008">templ=
ate</span><span style=3D"color:#660"><</span><span style=3D"color:#008">=
class</span><span style=3D"color:#000"> U</span><span style=3D"color:#660">=
></span><span style=3D"color:#000"><br>=C2=A0 self_t</span><span style=
=3D"color:#660">&</span><span style=3D"color:#000"> </span><span style=
=3D"color:#008">operator</span><span style=3D"color:#000"> </span><span sty=
le=3D"color:#660">=3D</span><span style=3D"color:#000"> </span><span style=
=3D"color:#660">(</span><span style=3D"color:#008">const</span><span style=
=3D"color:#000"> self_t</span><span style=3D"color:#660"><</span><span s=
tyle=3D"color:#000">U</span><span style=3D"color:#660">>&</span><spa=
n style=3D"color:#000"> </span><span style=3D"color:#660">);</span><span st=
yle=3D"color:#000"><br><br>=C2=A0 </span><span style=3D"color:#800">// This=
is invalid right now. Should be valid. Why whould it not be?</span><span s=
tyle=3D"color:#000"><br>=C2=A0 </span><span style=3D"color:#660">~</span><s=
pan style=3D"color:#000">self_t</span><span style=3D"color:#660">();</span>=
<span style=3D"color:#000"><br></span><span style=3D"color:#660">};</span><=
span style=3D"color:#000"><br><br></span><span style=3D"color:#008">class</=
span><span style=3D"color:#000"> </span><span style=3D"color:#660">{</span>=
<span style=3D"color:#000"><br>=C2=A0 </span><span style=3D"color:#008">usi=
ng</span><span style=3D"color:#000"> self_t </span><span style=3D"color:#66=
0">=3D</span><span style=3D"color:#000"> </span><span style=3D"color:#660">=
???;</span><span style=3D"color:#000"> </span><span style=3D"color:#800">//=
Can't be done right now.</span><span style=3D"color:#000"><br></span><=
span style=3D"color:#660">};</span><span style=3D"color:#000"><br></span></=
div></code></div><br>How to handle calling the destructor?<br><br><div styl=
e=3D"background-color:rgb(250,250,250);border-color:rgb(187,187,187);border=
-style:solid;border-width:1px;word-wrap:break-word"><code><div><span style=
=3D"color:#000"><br></span><span style=3D"color:#008">class</span><span sty=
le=3D"color:#000"> C </span><span style=3D"color:#660">{</span><span style=
=3D"color:#000"><br>=C2=A0 </span><span style=3D"color:#008">template</span=
><span style=3D"color:#660"><</span><span style=3D"color:#008">class</sp=
an><span style=3D"color:#000"> T</span><span style=3D"color:#660">></spa=
n><span style=3D"color:#000"><br>=C2=A0 </span><span style=3D"color:#008">v=
oid</span><span style=3D"color:#000"> destroy</span><span style=3D"color:#6=
60">(</span><span style=3D"color:#000">T</span><span style=3D"color:#660">&=
amp;</span><span style=3D"color:#000"> </span><span style=3D"color:#008">ob=
ject</span><span style=3D"color:#660">)</span><span style=3D"color:#000"> <=
/span><span style=3D"color:#660">{</span><span style=3D"color:#000"><br>=C2=
=A0 =C2=A0 </span><span style=3D"color:#800">// Confusing use of 'self_=
t'? Is it 'T' or 'C'?</span><span style=3D"color:#000">=
<br>=C2=A0 =C2=A0 </span><span style=3D"color:#008">object</span><span styl=
e=3D"color:#660">.~</span><span style=3D"color:#000">self_t</span><span sty=
le=3D"color:#660">();</span><span style=3D"color:#000"><br>=C2=A0 =C2=A0 </=
span><span style=3D"color:#800">// Is the above an exception, or do we allo=
w the following?</span><span style=3D"color:#000"><br>=C2=A0 =C2=A0 </span>=
<span style=3D"color:#008">object</span><span style=3D"color:#660">.</span>=
<span style=3D"color:#000">self_t another_object</span><span style=3D"color=
:#660">;</span><span style=3D"color:#000"><br>=C2=A0 =C2=A0 </span><span st=
yle=3D"color:#800">// What if we drop the destructor name? What do we need =
it for anyway?</span><span style=3D"color:#000"><br>=C2=A0 =C2=A0 </span><s=
pan style=3D"color:#008">object</span><span style=3D"color:#660">.~();</spa=
n><span style=3D"color:#000"><br>=C2=A0 </span><span style=3D"color:#660">}=
</span><span style=3D"color:#000"><br>=C2=A0 </span><span style=3D"color:#8=
00">// Also elide the name in the declaration?</span><span style=3D"color:#=
000"><br>=C2=A0 </span><span style=3D"color:#660">~()</span><span style=3D"=
color:#000"> </span><span style=3D"color:#660">{</span><span style=3D"color=
:#000"> </span><span style=3D"color:#800">/* Now it really can't get an=
y shorter. */</span><span style=3D"color:#000"> </span><span style=3D"color=
:#660">}</span><span style=3D"color:#000"><br></span><span style=3D"color:#=
660">};</span><span style=3D"color:#000"><br></span></div></code></div><br>=
<br><br>On Tuesday, August 23, 2016 at 12:52:06 AM UTC+2, <a>gmis...@gmail.=
com</a> wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-le=
ft:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div=
><br></div><div>Is their as much value proposal now that we have editors an=
d IDE's that are getting so good at renaming?</div><div><br></div><div>=
I don't know if 'this' would work for your purposes, though I d=
oubt it. Perhaps we could also introduce a 'self' keyword. And that=
could be=C2=A0used here, though I'd kind of like that to=C2=A0work lik=
e 'this' but be a reference (or=C2=A0use _ maybe).</div><div><br><b=
r>On Tuesday, August 23, 2016 at 4:12:07 AM UTC+12, <a>btc...@gmail.com</a>=
wrote:</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px =
0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width=
:1px;border-left-style:solid"><div dir=3D"ltr">I apologize if an idea like =
this has been discussed/rejected before, I have not found a relevant discus=
sion.<br>Are there any compelling reasons that retyping the class name shou=
ld be required for ctors etc. ?<br><br>I propose allowing '<span style=
=3D"font-family:courier new,monospace">auto</span>' in place of the cla=
ss name.<br><br><div style=3D"border:1px solid rgb(187,187,187);background-=
color:rgb(250,250,250)"><code><div><span style=3D"color:rgb(0,0,136)">templ=
ate</span><span style=3D"color:rgb(102,102,0)"><</span><span style=3D"co=
lor:rgb(0,0,136)">class</span><span style=3D"color:rgb(0,0,0)"> T</span><sp=
an style=3D"color:rgb(102,102,0)">></span><span style=3D"color:rgb(0,0,0=
)"><br></span><span style=3D"color:rgb(0,0,136)">class</span><span style=3D=
"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,0,102)">SomeLongCla=
ssName</span><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:=
rgb(102,102,0)">{</span><span style=3D"color:rgb(0,0,0)"><br></span><span s=
tyle=3D"color:rgb(0,0,136)">public</span><span style=3D"color:rgb(102,102,0=
)">:</span><span style=3D"color:rgb(0,0,0)"><br>=C2=A0 =C2=A0 </span><span =
style=3D"color:rgb(136,0,0)">// Short and readable</span><span style=3D"col=
or:rgb(0,0,0)"><br>=C2=A0 =C2=A0 </span><span style=3D"color:rgb(0,0,136)">=
auto</span><span style=3D"color:rgb(102,102,0)">&</span><span style=3D"=
color:rgb(0,0,0)"> </span><span style=3D"color:rgb(0,0,136)">operator</span=
><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,102,=
0)">=3D</span><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"color=
:rgb(102,102,0)">(</span><span style=3D"color:rgb(0,0,136)">const</span><sp=
an style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(0,0,136)">au=
to</span><span style=3D"color:rgb(102,102,0)">&</span><span style=3D"co=
lor:rgb(0,0,0)"> other</span><span style=3D"color:rgb(102,102,0)">)</span><=
span style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,102,0)=
">{</span><span style=3D"color:rgb(136,0,0)">/*...*/</span><span style=3D"c=
olor:rgb(102,102,0)">}</span><span style=3D"color:rgb(0,0,0)"><br></span><s=
pan style=3D"color:rgb(102,102,0)">};</span><span style=3D"color:rgb(0,0,0)=
"><br><br></span><span style=3D"color:rgb(102,0,102)">SomeLongClassName</sp=
an><span style=3D"color:rgb(102,102,0)"><</span><span style=3D"color:rgb=
(0,0,136)">long</span><span style=3D"color:rgb(0,0,0)"> </span><span style=
=3D"color:rgb(0,0,136)">long</span><span style=3D"color:rgb(0,0,0)"> </span=
><span style=3D"color:rgb(0,0,136)">double</span><span style=3D"color:rgb(1=
02,102,0)">></span><span style=3D"color:rgb(0,0,0)"> a</span><span style=
=3D"color:rgb(102,102,0)">;</span><span style=3D"color:rgb(0,0,0)"><br>a</s=
pan><span style=3D"color:rgb(102,102,0)">.~</span><span style=3D"color:rgb(=
0,0,136)">auto</span><span style=3D"color:rgb(102,102,0)">();</span><span s=
tyle=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(136,0,0)">// Nic=
e and short</span><span style=3D"color:rgb(0,0,0)"><br><br></span><span sty=
le=3D"color:rgb(136,0,0)">// Allows for special member functions in anonymo=
us classes</span><span style=3D"color:rgb(0,0,0)"><br></span><span style=3D=
"color:rgb(0,0,136)">class</span><span style=3D"color:rgb(0,0,0)"> </span><=
span style=3D"color:rgb(102,102,0)">{</span><span style=3D"color:rgb(0,0,0)=
"><br>=C2=A0 =C2=A0 </span><span style=3D"color:rgb(0,0,136)">auto</span><s=
pan style=3D"color:rgb(102,102,0)">()</span><span style=3D"color:rgb(0,0,0)=
"> </span><span style=3D"color:rgb(102,102,0)">{</span><span style=3D"color=
:rgb(136,0,0)">/*...*/</span><span style=3D"color:rgb(102,102,0)">}</span><=
span style=3D"color:rgb(0,0,0)"><br>=C2=A0 =C2=A0 </span><span style=3D"col=
or:rgb(0,0,136)">auto</span><span style=3D"color:rgb(102,102,0)">&</spa=
n><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(0,0,136=
)">operator</span><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"c=
olor:rgb(102,102,0)">=3D</span><span style=3D"color:rgb(0,0,0)"> </span><sp=
an style=3D"color:rgb(102,102,0)">(</span><span style=3D"color:rgb(0,0,136)=
">auto</span><span style=3D"color:rgb(102,102,0)">&&</span><span st=
yle=3D"color:rgb(0,0,0)"> other</span><span style=3D"color:rgb(102,102,0)">=
)</span><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(1=
02,102,0)">{</span><span style=3D"color:rgb(136,0,0)">/*...*/</span><span s=
tyle=3D"color:rgb(102,102,0)">}</span><span style=3D"color:rgb(0,0,0)"><br>=
=C2=A0 =C2=A0 </span><span style=3D"color:rgb(102,102,0)">~</span><span sty=
le=3D"color:rgb(0,0,136)">auto</span><span style=3D"color:rgb(102,102,0)">(=
)</span><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(1=
02,102,0)">{</span><span style=3D"color:rgb(136,0,0)">/*...*/</span><span s=
tyle=3D"color:rgb(102,102,0)">}</span><span style=3D"color:rgb(0,0,0)"><br>=
</span><span style=3D"color:rgb(102,102,0)">};</span><span style=3D"color:r=
gb(0,0,0)"><br></span></div></code></div><br>Since I have zero experience w=
ith proposals, I would just like to know if a change like this could be ben=
efitial, or is complete nonsense.<br><br>Kind regards,<br>Patrick<br></div>=
</blockquote></div></blockquote></div>
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"javascript:void(0)" target=3D"_blank" gdf-obfuscated-mai=
lto=3D"4jPuGbCXDQAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D'javas=
cript:';return true;" onclick=3D"this.href=3D'javascript:';retu=
rn true;">std-proposal...@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"javascript:void(0)" target=
=3D"_blank" gdf-obfuscated-mailto=3D"4jPuGbCXDQAJ" rel=3D"nofollow" onmouse=
down=3D"this.href=3D'javascript:';return true;" onclick=3D"this.hre=
f=3D'javascript:';return true;">std-pr...@isocpp.org</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/e54c473d-3a5f-4c8e-b4cc-3a5cdecad978%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" target=3D"_blank" =
rel=3D"nofollow" onmousedown=3D"this.href=3D'https://groups.google.com/=
a/isocpp.org/d/msgid/std-proposals/e54c473d-3a5f-4c8e-b4cc-3a5cdecad978%40i=
socpp.org?utm_medium\x3demail\x26utm_source\x3dfooter';return true;" on=
click=3D"this.href=3D'https://groups.google.com/a/isocpp.org/d/msgid/st=
d-proposals/e54c473d-3a5f-4c8e-b4cc-3a5cdecad978%40isocpp.org?utm_medium\x3=
demail\x26utm_source\x3dfooter';return true;">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/e54c473d-3a5f-4c8e-<wbr>b4cc-=
3a5cdecad978%40isocpp.org</a><wbr>.<br>
<br></div></div></div></div><div><div>
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"javascript:void(0)" target=3D"_blank" gdf-obfuscated-mai=
lto=3D"4jPuGbCXDQAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D'javas=
cript:';return true;" onclick=3D"this.href=3D'javascript:';retu=
rn true;">std-proposal...@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"javascript:void(0)" target=
=3D"_blank" gdf-obfuscated-mailto=3D"4jPuGbCXDQAJ" rel=3D"nofollow" onmouse=
down=3D"this.href=3D'javascript:';return true;" onclick=3D"this.hre=
f=3D'javascript:';return true;">std-pr...@isocpp.org</a>.<br></div>=
</div>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/20160823233202.4927569.38307.16135%40=
gmail.com?utm_medium=3Demail&utm_source=3Dfooter" target=3D"_blank" rel=
=3D"nofollow" onmousedown=3D"this.href=3D'https://groups.google.com/a/i=
socpp.org/d/msgid/std-proposals/20160823233202.4927569.38307.16135%40gmail.=
com?utm_medium\x3demail\x26utm_source\x3dfooter';return true;" onclick=
=3D"this.href=3D'https://groups.google.com/a/isocpp.org/d/msgid/std-pro=
posals/20160823233202.4927569.38307.16135%40gmail.com?utm_medium\x3demail\x=
26utm_source\x3dfooter';return true;">https://groups.google.com/a/<wbr>=
isocpp.org/d/msgid/std-<wbr>proposals/20160823233202.<wbr>4927569.38307.161=
35%40gmail.<wbr>com</a>.<br>
</blockquote></div><br></div></blockquote><div><br>Which problems do you se=
e with the option that involves introducing a new keyword, aside from intro=
ducing a new keyword?<br><br><br><br>On Wednesday, August 24, 2016 at 1:32:=
09 AM UTC+2, Tony V E wrote:<blockquote class=3D"gmail_quote" style=3D"marg=
in: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><d=
iv style=3D"background-color:rgb(255,255,255);line-height:initial" lang=3D"=
en-US"> =
<div style=3D"width:100%;font-size:initial;font-family:Ca=
libri,'Slate Pro',sans-serif,sans-serif;color:rgb(31,73,125);text-a=
lign:initial;background-color:rgb(255,255,255)">There's no reason to ma=
ke it easier to explicitly call a destructor. It is not something you do ve=
ry often. </div>
=20
<div style=3D"=
width:100%;font-size:initial;font-family:Calibri,'Slate Pro',sans-s=
erif,sans-serif;color:rgb(31,73,125);text-align:initial;background-color:rg=
b(255,255,255)"><br style=3D"display:initial"></div>
=20
=20
<div style=3D"font-size:=
initial;font-family:Calibri,'Slate Pro',sans-serif,sans-serif;color=
:rgb(31,73,125);text-align:initial;background-color:rgb(255,255,255)">Sent=
=C2=A0from=C2=A0my=C2=A0BlackBerry=C2=A0<wbr>portable=C2=A0Babbage=C2=A0Dev=
ice</div>
=20
=20
<table style=3D"background-color:white;bo=
rder-spacing:0px" width=3D"100%"> <tbody><tr><td colspan=3D"2" style=3D"fon=
t-size:initial;text-align:initial;background-color:rgb(255,255,255)"> =
<div style=3D"border-style:solid none none;border-top-=
color:rgb(181,196,223);border-top-width:1pt;padding:3pt 0in 0in;font-family=
:Tahoma,'BB Alpha Sans','Slate Pro';font-size:10pt"> <div>=
<b>From: </b><a target=3D"_blank" rel=3D"nofollow">btc...@gmail.com</a></di=
v><div><b>Sent: </b>Tuesday, August 23, 2016 4:46 AM</div><div><b>To: </b>I=
SO C++ Standard - Future Proposals</div><div><b>Reply To: </b><a target=3D"=
_blank" rel=3D"nofollow">std-pr...@isocpp.org</a></div><div><b>Subject: </b=
>[std-proposals] Re: About the naming of special member functions</div></di=
v></td></tr></tbody></table><br><div><div dir=3D"ltr"><span style=3D"backgr=
ound-color:rgb(255,255,255)"><span style=3D"color:rgb(0,0,0)"><span style=
=3D"font-family:arial,sans-serif">If <span style=3D"color:rgb(0,0,255)"><sp=
an style=3D"font-family:courier new,monospace">class</span></span> introduc=
es too many issues, the compiler could define <span style=3D"color:rgb(0,0,=
255)"><span style=3D"font-family:courier new,monospace">self_t</span></span=
> to mean the type of the enclosing class, which would not be too hard I im=
agine.<br><br></span></span></span><div style=3D"background-color:rgb(250,2=
50,250);border-color:rgb(187,187,187);border-style:solid;border-width:1px;w=
ord-wrap:break-word"><code><div><span style=3D"color:#008">template</span><=
span style=3D"color:#660"><</span><span style=3D"color:#008">class</span=
><span style=3D"color:#000"> T</span><span style=3D"color:#660">></span>=
<span style=3D"color:#000"><br></span><span style=3D"color:#008">class</spa=
n><span style=3D"color:#000"> </span><span style=3D"color:#606">SomeClass</=
span><span style=3D"color:#000"> </span><span style=3D"color:#660">{</span>=
<span style=3D"color:#000"><br>=C2=A0 </span><span style=3D"color:#800">// =
Make the compiler do something like this implicitly.</span><span style=3D"c=
olor:#000"><br>=C2=A0 </span><span style=3D"color:#008">using</span><span s=
tyle=3D"color:#000"> self_t </span><span style=3D"color:#660">=3D</span><sp=
an style=3D"color:#000"> </span><span style=3D"color:#606">SomeClass</span>=
<span style=3D"color:#660">;</span><span style=3D"color:#000"><br>=C2=A0<br=
>=C2=A0 </span><span style=3D"color:#800">// I think this looks nice.</span=
><span style=3D"color:#000"><br>=C2=A0 self_t</span><span style=3D"color:#6=
60">(</span><span style=3D"color:#008">int</span><span style=3D"color:#000"=
> a</span><span style=3D"color:#660">,</span><span style=3D"color:#000"> </=
span><span style=3D"color:#008">int</span><span style=3D"color:#000"> b</sp=
an><span style=3D"color:#660">);</span><span style=3D"color:#000"><br>=C2=
=A0 self_t</span><span style=3D"color:#660">()</span><span style=3D"color:#=
000"> </span><span style=3D"color:#660">:</span><span style=3D"color:#000">=
self_t</span><span style=3D"color:#660">(</span><span style=3D"color:#066"=
>42</span><span style=3D"color:#660">,</span><span style=3D"color:#000"> </=
span><span style=3D"color:#066">1337</span><span style=3D"color:#660">)</sp=
an><span style=3D"color:#000"> </span><span style=3D"color:#660">{}</span><=
span style=3D"color:#000"><br>=C2=A0 self_t</span><span style=3D"color:#660=
">&</span><span style=3D"color:#000"> </span><span style=3D"color:#008"=
>operator</span><span style=3D"color:#000"> </span><span style=3D"color:#66=
0">=3D</span><span style=3D"color:#000"> </span><span style=3D"color:#660">=
(</span><span style=3D"color:#008">const</span><span style=3D"color:#000"> =
self_t</span><span style=3D"color:#660">&</span><span style=3D"color:#0=
00"> </span><span style=3D"color:#660">);</span><span style=3D"color:#000">=
<br><br>=C2=A0 </span><span style=3D"color:#800">// Should 'self_t'=
be 'SomeClass<T>' or 'SomeClass', allowing the follo=
wing?</span><span style=3D"color:#000"><br>=C2=A0 </span><span style=3D"col=
or:#008">template</span><span style=3D"color:#660"><</span><span style=
=3D"color:#008">class</span><span style=3D"color:#000"> U</span><span style=
=3D"color:#660">></span><span style=3D"color:#000"><br>=C2=A0 self_t</sp=
an><span style=3D"color:#660">&</span><span style=3D"color:#000"> </spa=
n><span style=3D"color:#008">operator</span><span style=3D"color:#000"> </s=
pan><span style=3D"color:#660">=3D</span><span style=3D"color:#000"> </span=
><span style=3D"color:#660">(</span><span style=3D"color:#008">const</span>=
<span style=3D"color:#000"> self_t</span><span style=3D"color:#660"><</s=
pan><span style=3D"color:#000">U</span><span style=3D"color:#660">>&=
</span><span style=3D"color:#000"> </span><span style=3D"color:#660">);</sp=
an><span style=3D"color:#000"><br><br>=C2=A0 </span><span style=3D"color:#8=
00">// This is invalid right now. Should be valid. Why whould it not be?</s=
pan><span style=3D"color:#000"><br>=C2=A0 </span><span style=3D"color:#660"=
>~</span><span style=3D"color:#000">self_t</span><span style=3D"color:#660"=
>();</span><span style=3D"color:#000"><br></span><span style=3D"color:#660"=
>};</span><span style=3D"color:#000"><br><br></span><span style=3D"color:#0=
08">class</span><span style=3D"color:#000"> </span><span style=3D"color:#66=
0">{</span><span style=3D"color:#000"><br>=C2=A0 </span><span style=3D"colo=
r:#008">using</span><span style=3D"color:#000"> self_t </span><span style=
=3D"color:#660">=3D</span><span style=3D"color:#000"> </span><span style=3D=
"color:#660">???;</span><span style=3D"color:#000"> </span><span style=3D"c=
olor:#800">// Can't be done right now.</span><span style=3D"color:#000"=
><br></span><span style=3D"color:#660">};</span><span style=3D"color:#000">=
<br></span></div></code></div><br>How to handle calling the destructor?<br>=
<br><div style=3D"background-color:rgb(250,250,250);border-color:rgb(187,18=
7,187);border-style:solid;border-width:1px;word-wrap:break-word"><code><div=
><span style=3D"color:#000"><br></span><span style=3D"color:#008">class</sp=
an><span style=3D"color:#000"> C </span><span style=3D"color:#660">{</span>=
<span style=3D"color:#000"><br>=C2=A0 </span><span style=3D"color:#008">tem=
plate</span><span style=3D"color:#660"><</span><span style=3D"color:#008=
">class</span><span style=3D"color:#000"> T</span><span style=3D"color:#660=
">></span><span style=3D"color:#000"><br>=C2=A0 </span><span style=3D"co=
lor:#008">void</span><span style=3D"color:#000"> destroy</span><span style=
=3D"color:#660">(</span><span style=3D"color:#000">T</span><span style=3D"c=
olor:#660">&</span><span style=3D"color:#000"> </span><span style=3D"co=
lor:#008">object</span><span style=3D"color:#660">)</span><span style=3D"co=
lor:#000"> </span><span style=3D"color:#660">{</span><span style=3D"color:#=
000"><br>=C2=A0 =C2=A0 </span><span style=3D"color:#800">// Confusing use o=
f 'self_t'? Is it 'T' or 'C'?</span><span style=3D"=
color:#000"><br>=C2=A0 =C2=A0 </span><span style=3D"color:#008">object</spa=
n><span style=3D"color:#660">.~</span><span style=3D"color:#000">self_t</sp=
an><span style=3D"color:#660">();</span><span style=3D"color:#000"><br>=C2=
=A0 =C2=A0 </span><span style=3D"color:#800">// Is the above an exception, =
or do we allow the following?</span><span style=3D"color:#000"><br>=C2=A0 =
=C2=A0 </span><span style=3D"color:#008">object</span><span style=3D"color:=
#660">.</span><span style=3D"color:#000">self_t another_object</span><span =
style=3D"color:#660">;</span><span style=3D"color:#000"><br>=C2=A0 =C2=A0 <=
/span><span style=3D"color:#800">// What if we drop the destructor name? Wh=
at do we need it for anyway?</span><span style=3D"color:#000"><br>=C2=A0 =
=C2=A0 </span><span style=3D"color:#008">object</span><span style=3D"color:=
#660">.~();</span><span style=3D"color:#000"><br>=C2=A0 </span><span style=
=3D"color:#660">}</span><span style=3D"color:#000"><br>=C2=A0 </span><span =
style=3D"color:#800">// Also elide the name in the declaration?</span><span=
style=3D"color:#000"><br>=C2=A0 </span><span style=3D"color:#660">~()</spa=
n><span style=3D"color:#000"> </span><span style=3D"color:#660">{</span><sp=
an style=3D"color:#000"> </span><span style=3D"color:#800">/* Now it really=
can't get any shorter. */</span><span style=3D"color:#000"> </span><sp=
an style=3D"color:#660">}</span><span style=3D"color:#000"><br></span><span=
style=3D"color:#660">};</span><span style=3D"color:#000"><br></span></div>=
</code></div><br><br><br>On Tuesday, August 23, 2016 at 12:52:06 AM UTC+2, =
<a>gmis...@gmail.com</a> wrote:<blockquote class=3D"gmail_quote" style=3D"m=
argin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div=
dir=3D"ltr"><div><br></div><div>Is their as much value proposal now that w=
e have editors and IDE's that are getting so good at renaming?</div><di=
v><br></div><div>I
don't know if 'this' would work for your purposes, though I do=
ubt it.=20
Perhaps we could also introduce a 'self' keyword. And that could be=
=C2=A0used
here, though I'd kind of like that to=C2=A0work like 'this' bu=
t be a=20
reference (or=C2=A0use _ maybe).</div><div><br><br>On Tuesday, August 23, 2=
016 at 4:12:07 AM UTC+12, <a>btc...@gmail.com</a> wrote:</div><blockquote c=
lass=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;bor=
der-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:sol=
id"><div dir=3D"ltr">I apologize if an idea like this has been discussed/re=
jected before, I have not found a relevant discussion.<br>Are there any com=
pelling reasons that retyping the class name should be required for ctors e=
tc. ?<br><br>I propose allowing '<span style=3D"font-family:courier new=
,monospace">auto</span>' in place of the class name.<br><br><div style=
=3D"border:1px solid rgb(187,187,187);background-color:rgb(250,250,250)"><c=
ode><div><span style=3D"color:rgb(0,0,136)">template</span><span style=3D"c=
olor:rgb(102,102,0)"><</span><span style=3D"color:rgb(0,0,136)">class</s=
pan><span style=3D"color:rgb(0,0,0)"> T</span><span style=3D"color:rgb(102,=
102,0)">></span><span style=3D"color:rgb(0,0,0)"><br></span><span style=
=3D"color:rgb(0,0,136)">class</span><span style=3D"color:rgb(0,0,0)"> </spa=
n><span style=3D"color:rgb(102,0,102)">SomeLongClassName</span><span style=
=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,102,0)">{</span>=
<span style=3D"color:rgb(0,0,0)"><br></span><span style=3D"color:rgb(0,0,13=
6)">public</span><span style=3D"color:rgb(102,102,0)">:</span><span style=
=3D"color:rgb(0,0,0)"><br>=C2=A0 =C2=A0 </span><span style=3D"color:rgb(136=
,0,0)">// Short and readable</span><span style=3D"color:rgb(0,0,0)"><br>=C2=
=A0 =C2=A0 </span><span style=3D"color:rgb(0,0,136)">auto</span><span style=
=3D"color:rgb(102,102,0)">&</span><span style=3D"color:rgb(0,0,0)"> </s=
pan><span style=3D"color:rgb(0,0,136)">operator</span><span style=3D"color:=
rgb(0,0,0)"> </span><span style=3D"color:rgb(102,102,0)">=3D</span><span st=
yle=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,102,0)">(</sp=
an><span style=3D"color:rgb(0,0,136)">const</span><span style=3D"color:rgb(=
0,0,0)"> </span><span style=3D"color:rgb(0,0,136)">auto</span><span style=
=3D"color:rgb(102,102,0)">&</span><span style=3D"color:rgb(0,0,0)"> oth=
er</span><span style=3D"color:rgb(102,102,0)">)</span><span style=3D"color:=
rgb(0,0,0)"> </span><span style=3D"color:rgb(102,102,0)">{</span><span styl=
e=3D"color:rgb(136,0,0)">/*...*/</span><span style=3D"color:rgb(102,102,0)"=
>}</span><span style=3D"color:rgb(0,0,0)"><br></span><span style=3D"color:r=
gb(102,102,0)">};</span><span style=3D"color:rgb(0,0,0)"><br><br></span><sp=
an style=3D"color:rgb(102,0,102)">SomeLongClassName</span><span style=3D"co=
lor:rgb(102,102,0)"><</span><span style=3D"color:rgb(0,0,136)">long</spa=
n><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(0,0,136=
)">long</span><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"color=
:rgb(0,0,136)">double</span><span style=3D"color:rgb(102,102,0)">></span=
><span style=3D"color:rgb(0,0,0)"> a</span><span style=3D"color:rgb(102,102=
,0)">;</span><span style=3D"color:rgb(0,0,0)"><br>a</span><span style=3D"co=
lor:rgb(102,102,0)">.~</span><span style=3D"color:rgb(0,0,136)">auto</span>=
<span style=3D"color:rgb(102,102,0)">();</span><span style=3D"color:rgb(0,0=
,0)"> </span><span style=3D"color:rgb(136,0,0)">// Nice and short</span><sp=
an style=3D"color:rgb(0,0,0)"><br><br></span><span style=3D"color:rgb(136,0=
,0)">// Allows for special member functions in anonymous classes</span><spa=
n style=3D"color:rgb(0,0,0)"><br></span><span style=3D"color:rgb(0,0,136)">=
class</span><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:r=
gb(102,102,0)">{</span><span style=3D"color:rgb(0,0,0)"><br>=C2=A0 =C2=A0 <=
/span><span style=3D"color:rgb(0,0,136)">auto</span><span style=3D"color:rg=
b(102,102,0)">()</span><span style=3D"color:rgb(0,0,0)"> </span><span style=
=3D"color:rgb(102,102,0)">{</span><span style=3D"color:rgb(136,0,0)">/*...*=
/</span><span style=3D"color:rgb(102,102,0)">}</span><span style=3D"color:r=
gb(0,0,0)"><br>=C2=A0 =C2=A0 </span><span style=3D"color:rgb(0,0,136)">auto=
</span><span style=3D"color:rgb(102,102,0)">&</span><span style=3D"colo=
r:rgb(0,0,0)"> </span><span style=3D"color:rgb(0,0,136)">operator</span><sp=
an style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,102,0)">=
=3D</span><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb=
(102,102,0)">(</span><span style=3D"color:rgb(0,0,136)">auto</span><span st=
yle=3D"color:rgb(102,102,0)">&&</span><span style=3D"color:rgb(0,0,=
0)"> other</span><span style=3D"color:rgb(102,102,0)">)</span><span style=
=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,102,0)">{</span>=
<span style=3D"color:rgb(136,0,0)">/*...*/</span><span style=3D"color:rgb(1=
02,102,0)">}</span><span style=3D"color:rgb(0,0,0)"><br>=C2=A0 =C2=A0 </spa=
n><span style=3D"color:rgb(102,102,0)">~</span><span style=3D"color:rgb(0,0=
,136)">auto</span><span style=3D"color:rgb(102,102,0)">()</span><span style=
=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,102,0)">{</span>=
<span style=3D"color:rgb(136,0,0)">/*...*/</span><span style=3D"color:rgb(1=
02,102,0)">}</span><span style=3D"color:rgb(0,0,0)"><br></span><span style=
=3D"color:rgb(102,102,0)">};</span><span style=3D"color:rgb(0,0,0)"><br></s=
pan></div></code></div><br>Since
I have zero experience with proposals, I would just like to know if a=20
change like this could be benefitial, or is complete nonsense.<br><br>Kind =
regards,<br>Patrick<br></div></blockquote></div></blockquote></div>
-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a target=3D"_blank" rel=3D"nofollow">std-proposal...@<wbr>isocpp.o=
rg</a>.<br>
To post to this group, send email to <a target=3D"_blank" rel=3D"nofollow">=
std-pr...@isocpp.org</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/e54c473d-3a5f-4c8e-b4cc-3a5cdecad978%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" target=3D"_blank" =
rel=3D"nofollow">https://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-<w=
br>proposals/e54c473d-3a5f-4c8e-<wbr>b4cc-3a5cdecad978%40isocpp.org</a><wbr=
>.<br>
<br></div></div>
</blockquote><br>I understand that you don't regularly call the dtor ex=
plicitly. This was an attempt to not introduce an strange case wrt the usag=
e of <span style=3D"color: rgb(0, 0, 255);"><span style=3D"font-family: cou=
rier new,monospace;">self_t</span></span>. <br>If you think it would be bet=
ter, we can just not touch the dtor invokation at all, since it's often=
done in templated functions anyways, like <span style=3D"font-family: cour=
ier new,monospace;">a.~T();</span>. Still, since a class can have only one =
dtor (aside from calling a base class dtor via derived class instance, but =
why do that?), I thought about just dropping the name and using <span style=
=3D"font-family: courier new,monospace;">~</span> only, since there is noth=
ing to differentiate. Please correct me if this is wrong.<br><br><br><br>I =
thought about defining <span style=3D"font-family: courier new,monospace;">=
<span style=3D"color: rgb(0, 0, 255);">decltype</span></span> to have the m=
eaning of <span style=3D"font-family: courier new,monospace;"><span style=
=3D"color: rgb(0, 0, 255);">self_t</span></span> when used without a parame=
ter. Unfortunately, problems arise.<br>Also, using <span style=3D"font-fami=
ly: courier new,monospace;"><span style=3D"color: rgb(0, 0, 255);">this<spa=
n style=3D"font-family: arial,sans-serif;"> </span></span></span>as <span s=
tyle=3D"color: rgb(0, 0, 255);"><span style=3D"font-family: courier new,mon=
ospace;">self_t</span></span> would also be more confusing than helpful the=
way I see it.<br><br><div class=3D"prettyprint" style=3D"background-color:=
rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-style: solid;=
border-width: 1px; word-wrap: break-word;"><code class=3D"prettyprint"><di=
v class=3D"subprettyprint"><span style=3D"color: #008;" class=3D"styled-by-=
prettify">class</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"> C </span><span style=3D"color: #660;" class=3D"styled-by-prettify">{<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></span>=
<code class=3D"prettyprint"><span style=3D"color: #800;" class=3D"styled-by=
-prettify">=C2=A0 // Ok, invalid right now</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify"></span></code><span style=3D"color: #000;" =
class=3D"styled-by-prettify">.<br>=C2=A0 </span><span style=3D"color: #008;=
" class=3D"styled-by-prettify">decltype</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">();</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> <br>=C2=A0 </span><span style=3D"color: #008;" cla=
ss=3D"styled-by-prettify">decltype</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">&</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-=
prettify">operator</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
=3D</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span st=
yle=3D"color: #008;" class=3D"styled-by-prettify">decltype</span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">&&</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"> other</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">);</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify"></span><span style=3D"color: #800;" cla=
ss=3D"styled-by-prettify"></span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"><br><br>=C2=A0 </span><span style=3D"color: #008;" class=3D=
"styled-by-prettify">void</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"> f</span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">()</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">{</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 <=
/span><span style=3D"color: #008;" class=3D"styled-by-prettify">int</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> b</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">;</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #800;=
" class=3D"styled-by-prettify">// Declares 'b' of type 'int'=
;.</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=
=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-prettify"=
>int</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify">b</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">);</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #8=
00;" class=3D"styled-by-prettify">// Same as above.</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"><br><br>=C2=A0 =C2=A0 </span><span=
style=3D"color: #008;" class=3D"styled-by-prettify">decltype</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"> a</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">;</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> </span><span style=3D"color: #800;" clas=
s=3D"styled-by-prettify">// Declares 'a' of type 'C'.</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=
=A0 </span><span style=3D"color: #008;" class=3D"styled-by-prettify">declty=
pe</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify">a</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">);</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #800=
;" class=3D"styled-by-prettify">// Is this 'C' or the same as above=
?</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br><br>=
=C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">decltype</span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">(</span><span style=3D"color: #000;" class=3D"styled-by-prettify">b</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">);</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"c=
olor: #800;" class=3D"styled-by-prettify">// Is this 'int', or decl=
are 'b' of type 'C'?</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify"><br><br>=C2=A0 =C2=A0 </span><span style=3D"color=
: #008;" class=3D"styled-by-prettify">decltype</span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify">c</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">);</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> </span><span style=3D"color: #800;" class=3D"styled-by-prettify"=
>// Error or new variable?</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"><br>=C2=A0 </span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">}</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"><br></span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">};</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></=
span></div></code></div><br><br>At the moment, I think using a new keyword =
is the only sane way to make this idea work.<br></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/87f0cac3-3f7c-4cb3-8170-57446751ec97%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/87f0cac3-3f7c-4cb3-8170-57446751ec97=
%40isocpp.org</a>.<br />
------=_Part_6026_890534594.1472026308494--
------=_Part_6025_1690251157.1472026308492--
.
Author: Alexey Mamontov <caracrist@gmail.com>
Date: Wed, 24 Aug 2016 01:18:00 -0700 (PDT)
Raw View
------=_Part_54_2105416313.1472026680325
Content-Type: multipart/alternative;
boundary="----=_Part_55_1338378234.1472026680325"
------=_Part_55_1338378234.1472026680325
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
=D7=91=D7=AA=D7=90=D7=A8=D7=99=D7=9A =D7=99=D7=95=D7=9D =D7=A9=D7=9C=D7=99=
=D7=A9=D7=99, 23 =D7=91=D7=90=D7=95=D7=92=D7=95=D7=A1=D7=98 2016 =D7=91=D7=
=A9=D7=A2=D7=94 11:46:14 UTC+3, =D7=9E=D7=90=D7=AA btc...@gmail.com:
>
> If class introduces too many issues, the compiler could define self_t to=
=20
> mean the type of the enclosing class, which would not be too hard I imagi=
ne.
>
> template<class T>
> class SomeClass {
> // Make the compiler do something like this implicitly.
> using self_t =3D SomeClass;
> =20
> // I think this looks nice.
> self_t(int a, int b);
> self_t() : self_t(42, 1337) {}
> self_t& operator =3D (const self_t& );
>
> // Should 'self_t' be 'SomeClass<T>' or 'SomeClass', allowing the=20
> following?
> template<class U>
> self_t& operator =3D (const self_t<U>& );
>
> // This is invalid right now. Should be valid. Why whould it not be?
> ~self_t();
> };
>
> class {
> using self_t =3D ???; // Can't be done right now.
> };
>
> How to handle calling the destructor?
>
>
> class C {
> template<class T>
> void destroy(T& object) {
> // Confusing use of 'self_t'? Is it 'T' or 'C'?
> object.~self_t();
> // Is the above an exception, or do we allow the following?
> object.self_t another_object;
> // What if we drop the destructor name? What do we need it for anyway=
?
> object.~();
> }
> // Also elide the name in the declaration?
> ~() { /* Now it really can't get any shorter. */ }
> };
>
>>
>>>
"self" is confusing, better use "this", so you can't think of it as some=20
template parameter, and it must be private.
template<class T>
class SomeClass {
this_t(int a, int b);
this_t() : this_t(42, 1337) {}
this_t& operator =3D (const this_t& );
~this_t();
};
class {
this_t(int a, int b); // unnamed class constructors
this_t() : this_t(42, 1337) {}
};
// this_t is private, can't write this
object.~this_t();
// this_t is private, use decltype(object)
object.this_t another_object;
--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/3d6740fb-384c-44e7-8cd9-b876d79bf8cc%40isocpp.or=
g.
------=_Part_55_1338378234.1472026680325
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"rtl"><br><br>=D7=91=D7=AA=D7=90=D7=A8=D7=99=D7=9A =D7=99=D7=95=
=D7=9D =D7=A9=D7=9C=D7=99=D7=A9=D7=99, 23 =D7=91=D7=90=D7=95=D7=92=D7=95=D7=
=A1=D7=98 2016 =D7=91=D7=A9=D7=A2=D7=94 11:46:14 UTC+3, =D7=9E=D7=90=D7=AA =
btc...@gmail.com:<blockquote class=3D"gmail_quote" style=3D"margin: 0px 0px=
0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); borde=
r-left-width: 1px; border-left-style: solid;"><div dir=3D"ltr"><span style=
=3D"background-color: rgb(255, 255, 255);"><span style=3D"color: rgb(0, 0, =
0);"><span style=3D"font-family: arial,sans-serif;">If <span style=3D"color=
: rgb(0, 0, 255);"><span style=3D"font-family: courier new,monospace;">clas=
s</span></span> introduces too many issues, the compiler could define <span=
style=3D"color: rgb(0, 0, 255);"><span style=3D"font-family: courier new,m=
onospace;">self_t</span></span> to mean the type of the enclosing class, wh=
ich would not be too hard I imagine.<br><br></span></span></span><div style=
=3D"border: 1px solid rgb(187, 187, 187); border-image: none; -ms-word-wrap=
: break-word; background-color: rgb(250, 250, 250);"><code><div><span style=
=3D"color: rgb(0, 0, 136);">template</span><span style=3D"color: rgb(102, 1=
02, 0);"><</span><span style=3D"color: rgb(0, 0, 136);">class</span><spa=
n style=3D"color: rgb(0, 0, 0);"> T</span><span style=3D"color: rgb(102, 10=
2, 0);">></span><span style=3D"color: rgb(0, 0, 0);"><br></span><span st=
yle=3D"color: rgb(0, 0, 136);">class</span><span style=3D"color: rgb(0, 0, =
0);"> </span><span style=3D"color: rgb(102, 0, 102);">SomeClass</span><span=
style=3D"color: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(102, 102,=
0);">{</span><span style=3D"color: rgb(0, 0, 0);"><br>=C2=A0 </span><span =
style=3D"color: rgb(136, 0, 0);">// Make the compiler do something like thi=
s implicitly.</span><span style=3D"color: rgb(0, 0, 0);"><br>=C2=A0 </span>=
<span style=3D"color: rgb(0, 0, 136);">using</span><span style=3D"color: rg=
b(0, 0, 0);"> self_t </span><span style=3D"color: rgb(102, 102, 0);">=3D</s=
pan><span style=3D"color: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(=
102, 0, 102);">SomeClass</span><span style=3D"color: rgb(102, 102, 0);">;</=
span><span style=3D"color: rgb(0, 0, 0);"><br>=C2=A0<br>=C2=A0 </span><span=
style=3D"color: rgb(136, 0, 0);">// I think this looks nice.</span><span s=
tyle=3D"color: rgb(0, 0, 0);"><br>=C2=A0 self_t</span><span style=3D"color:=
rgb(102, 102, 0);">(</span><span style=3D"color: rgb(0, 0, 136);">int</spa=
n><span style=3D"color: rgb(0, 0, 0);"> a</span><span style=3D"color: rgb(1=
02, 102, 0);">,</span><span style=3D"color: rgb(0, 0, 0);"> </span><span st=
yle=3D"color: rgb(0, 0, 136);">int</span><span style=3D"color: rgb(0, 0, 0)=
;"> b</span><span style=3D"color: rgb(102, 102, 0);">);</span><span style=
=3D"color: rgb(0, 0, 0);"><br>=C2=A0 self_t</span><span style=3D"color: rgb=
(102, 102, 0);">()</span><span style=3D"color: rgb(0, 0, 0);"> </span><span=
style=3D"color: rgb(102, 102, 0);">:</span><span style=3D"color: rgb(0, 0,=
0);"> self_t</span><span style=3D"color: rgb(102, 102, 0);">(</span><span =
style=3D"color: rgb(0, 102, 102);">42</span><span style=3D"color: rgb(102, =
102, 0);">,</span><span style=3D"color: rgb(0, 0, 0);"> </span><span style=
=3D"color: rgb(0, 102, 102);">1337</span><span style=3D"color: rgb(102, 102=
, 0);">)</span><span style=3D"color: rgb(0, 0, 0);"> </span><span style=3D"=
color: rgb(102, 102, 0);">{}</span><span style=3D"color: rgb(0, 0, 0);"><br=
>=C2=A0 self_t</span><span style=3D"color: rgb(102, 102, 0);">&</span><=
span style=3D"color: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(0, 0,=
136);">operator</span><span style=3D"color: rgb(0, 0, 0);"> </span><span s=
tyle=3D"color: rgb(102, 102, 0);">=3D</span><span style=3D"color: rgb(0, 0,=
0);"> </span><span style=3D"color: rgb(102, 102, 0);">(</span><span style=
=3D"color: rgb(0, 0, 136);">const</span><span style=3D"color: rgb(0, 0, 0);=
"> self_t</span><span style=3D"color: rgb(102, 102, 0);">&</span><span =
style=3D"color: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(102, 102, =
0);">);</span><span style=3D"color: rgb(0, 0, 0);"><br><br>=C2=A0 </span><s=
pan style=3D"color: rgb(136, 0, 0);">// Should 'self_t' be 'Som=
eClass<T>' or 'SomeClass', allowing the following?</span>=
<span style=3D"color: rgb(0, 0, 0);"><br>=C2=A0 </span><span style=3D"color=
: rgb(0, 0, 136);">template</span><span style=3D"color: rgb(102, 102, 0);">=
<</span><span style=3D"color: rgb(0, 0, 136);">class</span><span style=
=3D"color: rgb(0, 0, 0);"> U</span><span style=3D"color: rgb(102, 102, 0);"=
>></span><span style=3D"color: rgb(0, 0, 0);"><br>=C2=A0 self_t</span><s=
pan style=3D"color: rgb(102, 102, 0);">&</span><span style=3D"color: rg=
b(0, 0, 0);"> </span><span style=3D"color: rgb(0, 0, 136);">operator</span>=
<span style=3D"color: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(102,=
102, 0);">=3D</span><span style=3D"color: rgb(0, 0, 0);"> </span><span sty=
le=3D"color: rgb(102, 102, 0);">(</span><span style=3D"color: rgb(0, 0, 136=
);">const</span><span style=3D"color: rgb(0, 0, 0);"> self_t</span><span st=
yle=3D"color: rgb(102, 102, 0);"><</span><span style=3D"color: rgb(0, 0,=
0);">U</span><span style=3D"color: rgb(102, 102, 0);">>&</span><spa=
n style=3D"color: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(102, 102=
, 0);">);</span><span style=3D"color: rgb(0, 0, 0);"><br><br>=C2=A0 </span>=
<span style=3D"color: rgb(136, 0, 0);">// This is invalid right now. Should=
be valid. Why whould it not be?</span><span style=3D"color: rgb(0, 0, 0);"=
><br>=C2=A0 </span><span style=3D"color: rgb(102, 102, 0);">~</span><span s=
tyle=3D"color: rgb(0, 0, 0);">self_t</span><span style=3D"color: rgb(102, 1=
02, 0);">();</span><span style=3D"color: rgb(0, 0, 0);"><br></span><span st=
yle=3D"color: rgb(102, 102, 0);">};</span><span style=3D"color: rgb(0, 0, 0=
);"><br><br></span><span style=3D"color: rgb(0, 0, 136);">class</span><span=
style=3D"color: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(102, 102,=
0);">{</span><span style=3D"color: rgb(0, 0, 0);"><br>=C2=A0 </span><span =
style=3D"color: rgb(0, 0, 136);">using</span><span style=3D"color: rgb(0, 0=
, 0);"> self_t </span><span style=3D"color: rgb(102, 102, 0);">=3D</span><s=
pan style=3D"color: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(102, 1=
02, 0);">???;</span><span style=3D"color: rgb(0, 0, 0);"> </span><span styl=
e=3D"color: rgb(136, 0, 0);">// Can't be done right now.</span><span st=
yle=3D"color: rgb(0, 0, 0);"><br></span><span style=3D"color: rgb(102, 102,=
0);">};</span><span style=3D"color: rgb(0, 0, 0);"><br></span></div></code=
></div><br>How to handle calling the destructor?<br><br><div style=3D"borde=
r: 1px solid rgb(187, 187, 187); border-image: none; -ms-word-wrap: break-w=
ord; background-color: rgb(250, 250, 250);"><code><div><span style=3D"color=
: rgb(0, 0, 0);"><br></span><span style=3D"color: rgb(0, 0, 136);">class</s=
pan><span style=3D"color: rgb(0, 0, 0);"> C </span><span style=3D"color: rg=
b(102, 102, 0);">{</span><span style=3D"color: rgb(0, 0, 0);"><br>=C2=A0 </=
span><span style=3D"color: rgb(0, 0, 136);">template</span><span style=3D"c=
olor: rgb(102, 102, 0);"><</span><span style=3D"color: rgb(0, 0, 136);">=
class</span><span style=3D"color: rgb(0, 0, 0);"> T</span><span style=3D"co=
lor: rgb(102, 102, 0);">></span><span style=3D"color: rgb(0, 0, 0);"><br=
>=C2=A0 </span><span style=3D"color: rgb(0, 0, 136);">void</span><span styl=
e=3D"color: rgb(0, 0, 0);"> destroy</span><span style=3D"color: rgb(102, 10=
2, 0);">(</span><span style=3D"color: rgb(0, 0, 0);">T</span><span style=3D=
"color: rgb(102, 102, 0);">&</span><span style=3D"color: rgb(0, 0, 0);"=
> </span><span style=3D"color: rgb(0, 0, 136);">object</span><span style=3D=
"color: rgb(102, 102, 0);">)</span><span style=3D"color: rgb(0, 0, 0);"> </=
span><span style=3D"color: rgb(102, 102, 0);">{</span><span style=3D"color:=
rgb(0, 0, 0);"><br>=C2=A0 =C2=A0 </span><span style=3D"color: rgb(136, 0, =
0);">// Confusing use of 'self_t'? Is it 'T' or 'C'=
?</span><span style=3D"color: rgb(0, 0, 0);"><br>=C2=A0 =C2=A0 </span><span=
style=3D"color: rgb(0, 0, 136);">object</span><span style=3D"color: rgb(10=
2, 102, 0);">.~</span><span style=3D"color: rgb(0, 0, 0);">self_t</span><sp=
an style=3D"color: rgb(102, 102, 0);">();</span><span style=3D"color: rgb(0=
, 0, 0);"><br>=C2=A0 =C2=A0 </span><span style=3D"color: rgb(136, 0, 0);">/=
/ Is the above an exception, or do we allow the following?</span><span styl=
e=3D"color: rgb(0, 0, 0);"><br>=C2=A0 =C2=A0 </span><span style=3D"color: r=
gb(0, 0, 136);">object</span><span style=3D"color: rgb(102, 102, 0);">.</sp=
an><span style=3D"color: rgb(0, 0, 0);">self_t another_object</span><span s=
tyle=3D"color: rgb(102, 102, 0);">;</span><span style=3D"color: rgb(0, 0, 0=
);"><br>=C2=A0 =C2=A0 </span><span style=3D"color: rgb(136, 0, 0);">// What=
if we drop the destructor name? What do we need it for anyway?</span><span=
style=3D"color: rgb(0, 0, 0);"><br>=C2=A0 =C2=A0 </span><span style=3D"col=
or: rgb(0, 0, 136);">object</span><span style=3D"color: rgb(102, 102, 0);">=
..~();</span><span style=3D"color: rgb(0, 0, 0);"><br>=C2=A0 </span><span st=
yle=3D"color: rgb(102, 102, 0);">}</span><span style=3D"color: rgb(0, 0, 0)=
;"><br>=C2=A0 </span><span style=3D"color: rgb(136, 0, 0);">// Also elide t=
he name in the declaration?</span><span style=3D"color: rgb(0, 0, 0);"><br>=
=C2=A0 </span><span style=3D"color: rgb(102, 102, 0);">~()</span><span styl=
e=3D"color: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(102, 102, 0);"=
>{</span><span style=3D"color: rgb(0, 0, 0);"> </span><span style=3D"color:=
rgb(136, 0, 0);">/* Now it really can't get any shorter. */</span><spa=
n style=3D"color: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(102, 102=
, 0);">}</span><span style=3D"color: rgb(0, 0, 0);"><br></span><span style=
=3D"color: rgb(102, 102, 0);">};</span><span style=3D"color: rgb(0, 0, 0);"=
><br></span></div></code></div><blockquote class=3D"gmail_quote" style=3D"m=
argin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 20=
4, 204); border-left-width: 1px; border-left-style: solid;"><div dir=3D"ltr=
"><blockquote class=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; pad=
ding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1=
px; border-left-style: solid;"><div dir=3D"ltr"><br></div></blockquote></di=
v></blockquote></div></blockquote><div><br></div><div>"self" is c=
onfusing, better use "this", so you can't think of it as some=
template parameter, and it must be private.</div><div><br></div><div><span=
style=3D"color: rgb(0, 0, 136);">template</span><span style=3D"color: rgb(=
102, 102, 0);"><</span><span style=3D"color: rgb(0, 0, 136);">class</spa=
n><span style=3D"color: rgb(0, 0, 0);"> T</span><span style=3D"color: rgb(1=
02, 102, 0);">></span><span style=3D"color: rgb(0, 0, 0);"><br></span><s=
pan style=3D"color: rgb(0, 0, 136);">class</span><span style=3D"color: rgb(=
0, 0, 0);"> </span><span style=3D"color: rgb(102, 0, 102);">SomeClass</span=
><span style=3D"color: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(102=
, 102, 0);">{</span><span style=3D"color: rgb(0, 0, 0);"><br></span><span s=
tyle=3D"color: rgb(0, 0, 0);"><br>=C2=A0 this_t</span><span style=3D"color:=
rgb(102, 102, 0);">(</span><span style=3D"color: rgb(0, 0, 136);">int</spa=
n><span style=3D"color: rgb(0, 0, 0);"> a</span><span style=3D"color: rgb(1=
02, 102, 0);">,</span><span style=3D"color: rgb(0, 0, 0);"> </span><span st=
yle=3D"color: rgb(0, 0, 136);">int</span><span style=3D"color: rgb(0, 0, 0)=
;"> b</span><span style=3D"color: rgb(102, 102, 0);">);</span><span style=
=3D"color: rgb(0, 0, 0);"><br>=C2=A0 this_t</span><span style=3D"color: rgb=
(102, 102, 0);">()</span><span style=3D"color: rgb(0, 0, 0);"> </span><span=
style=3D"color: rgb(102, 102, 0);">:</span><span style=3D"color: rgb(0, 0,=
0);"> this_t</span><span style=3D"color: rgb(102, 102, 0);">(</span><span =
style=3D"color: rgb(0, 102, 102);">42</span><span style=3D"color: rgb(102, =
102, 0);">,</span><span style=3D"color: rgb(0, 0, 0);"> </span><span style=
=3D"color: rgb(0, 102, 102);">1337</span><span style=3D"color: rgb(102, 102=
, 0);">)</span><span style=3D"color: rgb(0, 0, 0);"> </span><span style=3D"=
color: rgb(102, 102, 0);">{}</span><span style=3D"color: rgb(0, 0, 0);"><br=
>=C2=A0 this_t</span><span style=3D"color: rgb(102, 102, 0);">&</span><=
span style=3D"color: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(0, 0,=
136);">operator</span><span style=3D"color: rgb(0, 0, 0);"> </span><span s=
tyle=3D"color: rgb(102, 102, 0);">=3D</span><span style=3D"color: rgb(0, 0,=
0);"> </span><span style=3D"color: rgb(102, 102, 0);">(</span><span style=
=3D"color: rgb(0, 0, 136);">const</span><span style=3D"color: rgb(0, 0, 0);=
"> this_t</span><span style=3D"color: rgb(102, 102, 0);">&</span><span =
style=3D"color: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(102, 102, =
0);">);</span><span style=3D"color: rgb(0, 0, 0);"><br></span><span style=
=3D"color: rgb(0, 0, 0);"><br>=C2=A0 </span><span style=3D"color: rgb(102, =
102, 0);">~<font color=3D"#000000">this</font></span><span style=3D"color: =
rgb(0, 0, 0);">_t</span><span style=3D"color: rgb(102, 102, 0);">();</span>=
<span style=3D"color: rgb(0, 0, 0);"><br></span><span style=3D"color: rgb(1=
02, 102, 0);">};</span><span style=3D"color: rgb(0, 0, 0);"><br><br></span>=
<span style=3D"color: rgb(0, 0, 136);">class</span><span style=3D"color: rg=
b(0, 0, 0);"> </span><span style=3D"color: rgb(102, 102, 0);">{</span><span=
style=3D"color: rgb(0, 0, 0);"><br>=C2=A0 this_t<span style=3D"color: rgb(=
102, 102, 0);">(</span><span style=3D"color: rgb(0, 0, 136);">int</span><sp=
an style=3D"color: rgb(0, 0, 0);"> a</span><span style=3D"color: rgb(102, 1=
02, 0);">,</span><span style=3D"color: rgb(0, 0, 0);"> </span><span style=
=3D"color: rgb(0, 0, 136);">int</span><span style=3D"color: rgb(0, 0, 0);">=
b</span><span style=3D"color: rgb(102, 102, 0);">); // unnamed class const=
ructors</span><span style=3D"color: rgb(0, 0, 0);"><br>=C2=A0 this_t</span>=
<span style=3D"color: rgb(102, 102, 0);">()</span><span style=3D"color: rgb=
(0, 0, 0);"> </span><span style=3D"color: rgb(102, 102, 0);">:</span><span =
style=3D"color: rgb(0, 0, 0);"> this_t</span><span style=3D"color: rgb(102,=
102, 0);">(</span><span style=3D"color: rgb(0, 102, 102);">42</span><span =
style=3D"color: rgb(102, 102, 0);">,</span><span style=3D"color: rgb(0, 0, =
0);"> </span><span style=3D"color: rgb(0, 102, 102);">1337</span><span styl=
e=3D"color: rgb(102, 102, 0);">)</span><span style=3D"color: rgb(0, 0, 0);"=
> </span><span style=3D"color: rgb(102, 102, 0);">{}</span><span style=3D"c=
olor: rgb(0, 0, 0);"></span></span><span style=3D"color: rgb(0, 0, 0);"><br=
></span><span style=3D"color: rgb(102, 102, 0);">};</span></div><div><span =
style=3D"color: rgb(102, 102, 0);"></span><span style=3D"color: rgb(0, 0, 0=
);"><br></span></div><div><font color=3D"#000000">=C2=A0=C2=A0=C2=A0 </font=
><span style=3D"color: rgb(136, 0, 0);">//=C2=A0this_t is private, can'=
t write this</span><span style=3D"color: rgb(0, 0, 0);"><br>=C2=A0=C2=A0=C2=
=A0 </span><span style=3D"color: rgb(0, 0, 136);">object</span><span style=
=3D"color: rgb(102, 102, 0);">.~</span><span style=3D"color: rgb(0, 0, 0);"=
>this_t</span><span style=3D"color: rgb(102, 102, 0);">();</span><span styl=
e=3D"color: rgb(0, 0, 0);"><br>=C2=A0 =C2=A0 </span><span style=3D"color: r=
gb(136, 0, 0);">// this_t is private, use decltype(object)</span></div><div=
><span style=3D"color: rgb(136, 0, 0);"></span><span style=3D"color: rgb(0,=
0, 0);">=C2=A0=C2=A0=C2=A0 </span><span style=3D"color: rgb(0, 0, 136);">o=
bject</span><span style=3D"color: rgb(102, 102, 0);">.<span style=3D"color:=
rgb(0, 0, 0);">this</span></span><span style=3D"color: rgb(0, 0, 0);">_t a=
nother_object</span><span style=3D"color: rgb(102, 102, 0);">;</span></div>=
<div><span style=3D"color: rgb(102, 102, 0);"><br></span></div><div><span s=
tyle=3D"color: rgb(102, 102, 0);"></span><span style=3D"color: rgb(0, 0, 0)=
;"><br></span></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/3d6740fb-384c-44e7-8cd9-b876d79bf8cc%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/3d6740fb-384c-44e7-8cd9-b876d79bf8cc=
%40isocpp.org</a>.<br />
------=_Part_55_1338378234.1472026680325--
------=_Part_54_2105416313.1472026680325--
.