Topic: Idea of virtual, uncopyable and immovable classes


Author: Andrew Tomazos <andrewtomazos@gmail.com>
Date: Sun, 14 Feb 2016 07:14:51 +0100
Raw View
--001a1142674874a6ce052bb4d1f5
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

I=E2=80=99m after some initial reactions to the following idea:

We propose two new context-sensitive keywords `uncopyable` and `immovable`,
and that class-head be modified as follows:

class-head:

 class-key attribute-specifier-seqopt class-head-name class-modifier-seqopt
base-clauseopt

class-modifier-seq:

 class-modifier class-modifier-seqopt

class-modifier:

 final

 virtual

 uncopyable

 immovable

A class-specifier of the form:

  class ClassName virtual { =E2=80=A6 };

is equivalent to:

  class ClassName {

     =E2=80=A6

   public: virtual ~ClassName() =3D default;

  };

A class-specifier of the form:

  class ClassName uncopyable { =E2=80=A6 };

is equivalent to:

  class ClassName {

     =E2=80=A6

     private:

     ClassName(const ClassName&) =3D delete;

     ClassName& operator=3D(const ClassName&) =3D delete;

 }

A class-specifier of the form:

  class ClassName immovable { =E2=80=A6 };

is equivalent to:

  class ClassName {

     =E2=80=A6

     private:

     ClassName(const ClassName&) =3D delete;

     ClassName(ClassName&&) =3D delete;

     ClassName& operator=3D(const ClassName&) =3D delete;

     ClassName& operator=3D(ClassName&&) =3D delete;

  }

Thanks,
Andrew.

--=20

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

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

<div dir=3D"ltr"><div><span id=3D"docs-internal-guid-a7ab9ba7-de66-dfd5-5f0=
4-92263761aa36"><p dir=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;mar=
gin-bottom:0pt"><span style=3D"font-size:14.6667px;font-family:Arial;color:=
rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:tr=
ansparent">I=E2=80=99m after some initial reactions to the following idea:<=
/span></p><br><p dir=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;margi=
n-bottom:0pt"><span style=3D"font-size:14.6667px;font-family:Arial;color:rg=
b(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:tran=
sparent">We propose two new context-sensitive keywords `uncopyable` and `im=
movable`, and that class-head be modified as follows:</span></p><br><p dir=
=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span =
style=3D"font-size:14.6667px;font-family:Arial;color:rgb(0,0,0);vertical-al=
ign:baseline;white-space:pre-wrap;background-color:transparent">class-head:=
</span></p><p dir=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;margin-b=
ottom:0pt"><span style=3D"font-size:14.6667px;font-family:Arial;color:rgb(0=
,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transpa=
rent"> =C2=A0class-key attribute-specifier-seq</span><span style=3D"font-si=
ze:8.8px;font-family:Arial;color:rgb(0,0,0);vertical-align:sub;white-space:=
pre-wrap;background-color:transparent">opt</span><span style=3D"font-size:1=
4.6667px;font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-s=
pace:pre-wrap;background-color:transparent"> class-head-name </span><span s=
tyle=3D"font-size:14.6667px;font-family:Arial;color:rgb(0,0,0);font-weight:=
700;vertical-align:baseline;white-space:pre-wrap;background-color:transpare=
nt">class-modifier-seq</span><span style=3D"font-size:8.8px;font-family:Ari=
al;color:rgb(0,0,0);font-weight:700;vertical-align:sub;white-space:pre-wrap=
;background-color:transparent">op</span><span style=3D"font-size:8.8px;font=
-family:Arial;color:rgb(0,0,0);vertical-align:sub;white-space:pre-wrap;back=
ground-color:transparent">t</span><span style=3D"font-size:14.6667px;font-f=
amily:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;b=
ackground-color:transparent"> base-clause</span><span style=3D"font-size:8.=
8px;font-family:Arial;color:rgb(0,0,0);vertical-align:sub;white-space:pre-w=
rap;background-color:transparent">opt</span><span style=3D"font-size:14.666=
7px;font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:=
pre-wrap;background-color:transparent"> </span></p><br><p dir=3D"ltr" style=
=3D"line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-=
size:14.6667px;font-family:Arial;color:rgb(0,0,0);font-weight:700;vertical-=
align:baseline;white-space:pre-wrap;background-color:transparent">class-mod=
ifier-seq:</span></p><p dir=3D"ltr" style=3D"line-height:1.38;margin-top:0p=
t;margin-bottom:0pt"><span style=3D"font-size:14.6667px;font-family:Arial;c=
olor:rgb(0,0,0);font-weight:700;vertical-align:baseline;white-space:pre-wra=
p;background-color:transparent"> =C2=A0class-modifier class-modifier-seq</s=
pan><span style=3D"font-size:8.8px;font-family:Arial;color:rgb(0,0,0);font-=
weight:700;vertical-align:sub;white-space:pre-wrap;background-color:transpa=
rent">opt</span></p><br><p dir=3D"ltr" style=3D"line-height:1.38;margin-top=
:0pt;margin-bottom:0pt"><span style=3D"font-size:14.6667px;font-family:Aria=
l;color:rgb(0,0,0);font-weight:700;vertical-align:baseline;white-space:pre-=
wrap;background-color:transparent">class-modifier:</span></p><p dir=3D"ltr"=
 style=3D"line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style=3D=
"font-size:14.6667px;font-family:Arial;color:rgb(0,0,0);vertical-align:base=
line;white-space:pre-wrap;background-color:transparent"> =C2=A0final</span>=
</p><p dir=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;margin-bottom:0=
pt"><span style=3D"font-size:14.6667px;font-family:Arial;color:rgb(0,0,0);f=
ont-weight:700;vertical-align:baseline;white-space:pre-wrap;background-colo=
r:transparent"> =C2=A0virtual</span></p><p dir=3D"ltr" style=3D"line-height=
:1.38;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:14.6667px;=
font-family:Arial;color:rgb(0,0,0);font-weight:700;vertical-align:baseline;=
white-space:pre-wrap;background-color:transparent"> =C2=A0uncopyable</span>=
</p><p dir=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;margin-bottom:0=
pt"><span style=3D"font-size:14.6667px;font-family:Arial;color:rgb(0,0,0);f=
ont-weight:700;vertical-align:baseline;white-space:pre-wrap;background-colo=
r:transparent"> =C2=A0immovable</span></p><br><p dir=3D"ltr" style=3D"line-=
height:1.38;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:14.6=
667px;font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-spac=
e:pre-wrap;background-color:transparent">A class-specifier of the form:</sp=
an></p><br><p dir=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;margin-b=
ottom:0pt"><span style=3D"font-size:14.6667px;font-family:Arial;color:rgb(0=
,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transpa=
rent"> =C2=A0=C2=A0class ClassName virtual { =E2=80=A6 };</span></p><br><p =
dir=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;margin-bottom:0pt"><sp=
an style=3D"font-size:14.6667px;font-family:Arial;color:rgb(0,0,0);vertical=
-align:baseline;white-space:pre-wrap;background-color:transparent">is equiv=
alent to:</span></p><br><p dir=3D"ltr" style=3D"line-height:1.38;margin-top=
:0pt;margin-bottom:0pt"><span style=3D"font-size:14.6667px;font-family:Aria=
l;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-=
color:transparent"> =C2=A0=C2=A0class ClassName {</span></p><p dir=3D"ltr" =
style=3D"line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style=3D"=
font-size:14.6667px;font-family:Arial;color:rgb(0,0,0);vertical-align:basel=
ine;white-space:pre-wrap;background-color:transparent"> =C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=E2=80=A6</span></p><br><p dir=3D"ltr" style=3D"line-height:1.3=
8;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:14.6667px;font=
-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap=
;background-color:transparent"> =C2=A0=C2=A0=C2=A0public: virtual ~ClassNam=
e() =3D default;</span></p><p dir=3D"ltr" style=3D"line-height:1.38;margin-=
top:0pt;margin-bottom:0pt"><span style=3D"font-size:14.6667px;font-family:A=
rial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;backgrou=
nd-color:transparent"> =C2=A0=C2=A0};</span></p><br><p dir=3D"ltr" style=3D=
"line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-siz=
e:14.6667px;font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;whit=
e-space:pre-wrap;background-color:transparent">A class-specifier of the for=
m:</span></p><br><p dir=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;ma=
rgin-bottom:0pt"><span style=3D"font-size:14.6667px;font-family:Arial;color=
:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:t=
ransparent"> =C2=A0=C2=A0class ClassName uncopyable { =E2=80=A6 };</span></=
p><br><p dir=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;margin-bottom=
:0pt"><span style=3D"font-size:14.6667px;font-family:Arial;color:rgb(0,0,0)=
;vertical-align:baseline;white-space:pre-wrap;background-color:transparent"=
>is equivalent to:</span></p><br><p dir=3D"ltr" style=3D"line-height:1.38;m=
argin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:14.6667px;font-fa=
mily:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;ba=
ckground-color:transparent"> =C2=A0=C2=A0class ClassName {</span></p><p dir=
=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span =
style=3D"font-size:14.6667px;font-family:Arial;color:rgb(0,0,0);vertical-al=
ign:baseline;white-space:pre-wrap;background-color:transparent"> =C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=E2=80=A6</span></p><div><span><br></span></div>=C2=A0=
 =C2=A0 =C2=A0private:<br><p dir=3D"ltr" style=3D"line-height:1.38;margin-t=
op:0pt;margin-bottom:0pt"><span style=3D"font-size:14.6667px;font-family:Ar=
ial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;backgroun=
d-color:transparent"> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0ClassName(const ClassNa=
me&amp;) =3D delete;</span></p><p dir=3D"ltr" style=3D"line-height:1.38;mar=
gin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:14.6667px;font-fami=
ly:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;back=
ground-color:transparent"> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0ClassName&amp; ope=
rator=3D(const ClassName&amp;) =3D delete;</span></p><p dir=3D"ltr" style=
=3D"line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-=
size:14.6667px;font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;w=
hite-space:pre-wrap;background-color:transparent"> =C2=A0}</span></p><br><p=
 dir=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;margin-bottom:0pt"><s=
pan style=3D"font-size:14.6667px;font-family:Arial;color:rgb(0,0,0);vertica=
l-align:baseline;white-space:pre-wrap;background-color:transparent">A class=
-specifier of the form:</span></p><br><p dir=3D"ltr" style=3D"line-height:1=
..38;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:14.6667px;fo=
nt-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wr=
ap;background-color:transparent"> =C2=A0=C2=A0class ClassName immovable { =
=E2=80=A6 };</span></p><br><p dir=3D"ltr" style=3D"line-height:1.38;margin-=
top:0pt;margin-bottom:0pt"><span style=3D"font-size:14.6667px;font-family:A=
rial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;backgrou=
nd-color:transparent">is equivalent to:</span></p><br><p dir=3D"ltr" style=
=3D"line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-=
size:14.6667px;font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;w=
hite-space:pre-wrap;background-color:transparent"> =C2=A0=C2=A0class ClassN=
ame {</span></p><p dir=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;mar=
gin-bottom:0pt"><span style=3D"font-size:14.6667px;font-family:Arial;color:=
rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:tr=
ansparent"> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=E2=80=A6</span></p><br>=C2=A0 =
=C2=A0 =C2=A0private:<br><p dir=3D"ltr" style=3D"line-height:1.38;margin-to=
p:0pt;margin-bottom:0pt"><span style=3D"font-size:14.6667px;font-family:Ari=
al;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background=
-color:transparent"> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0ClassName(const ClassNam=
e&amp;) =3D delete;</span></p><p dir=3D"ltr" style=3D"line-height:1.38;marg=
in-top:0pt;margin-bottom:0pt"><span style=3D"font-size:14.6667px;font-famil=
y:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;backg=
round-color:transparent"> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0ClassName(ClassName=
&amp;&amp;) =3D delete;</span></p><p dir=3D"ltr" style=3D"line-height:1.38;=
margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:14.6667px;font-f=
amily:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;b=
ackground-color:transparent"> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0ClassName&amp; =
operator=3D(const ClassName&amp;) =3D delete;</span></p><p dir=3D"ltr" styl=
e=3D"line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style=3D"font=
-size:14.6667px;font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;=
white-space:pre-wrap;background-color:transparent"> =C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0ClassName&amp; operator=3D(ClassName&amp;&amp;) =3D delete;</span>=
</p><br><p dir=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;margin-bott=
om:0pt"><span style=3D"font-size:14.6667px;font-family:Arial;color:rgb(0,0,=
0);vertical-align:baseline;white-space:pre-wrap;background-color:transparen=
t"> =C2=A0=C2=A0}</span></p><br>Thanks,</span></div><div><span>Andrew.</spa=
n></div><div><span><br></span></div><div><br></div></div>

<p></p>

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

--001a1142674874a6ce052bb4d1f5--

.


Author: Magnus Fromreide <magfr@lysator.liu.se>
Date: Sun, 14 Feb 2016 07:44:57 +0100
Raw View
On Sun, Feb 14, 2016 at 07:14:51AM +0100, Andrew Tomazos wrote:
> I=E2=80=99m after some initial reactions to the following idea:
>=20
> class-modifier:
>  final
>  virtual
>  uncopyable
>  immovable

Why add a second way to achieve something that already is possible?

Why use names that fail to match the traits? (uncopyable vs
is_copy_constructible, immovable vc is_move_constructible)

Will this come with library support for the attributed classes?
It is e.g. quite possible to define a subset of std::vector that
works with an uncopyable class but the current std::vector doesn't
support instantiation on uncopyable values.

/MF

--=20

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

.


Author: Jim Porter <jvp4846@g.rit.edu>
Date: Sun, 14 Feb 2016 01:06:09 -0600
Raw View
On 2/14/2016 12:44 AM, Magnus Fromreide wrote:
> On Sun, Feb 14, 2016 at 07:14:51AM +0100, Andrew Tomazos wrote:
>> I=E2=80=99m after some initial reactions to the following idea:
>>
>> class-modifier:
>>   final
>>   virtual
>>   uncopyable
>>   immovable
>
> Why add a second way to achieve something that already is possible?

`uncopyable` and `immovable` could also easily be implemented as a=20
library extension, as Boost has shown:=20
<http://www.boost.org/doc/libs/1_60_0/libs/core/doc/html/core/noncopyable.h=
tml>.=20
I don't think they're similar enough to `final` to really want to be=20
grammatically the same, either. I suppose I could see standardizing=20
boost::noncopyable, though (but I'm not sold either way at the moment).

I'm also not sure that the typing saved for the `virtual` case would be=20
worth adding new syntax that, in my opinion, is *less* clear than what=20
it's replacing. Perhaps that's just because I'm not used to it, though.

- Jim

--=20

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

.


Author: "'Matt Calabrese' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Tue, 16 Feb 2016 14:17:46 -0800
Raw View
--001a113cc342cce4c1052bea80bc
Content-Type: text/plain; charset=UTF-8

On Sat, Feb 13, 2016 at 11:06 PM, Jim Porter <jvp4846@g.rit.edu> wrote:
>
> `uncopyable` and `immovable` could also easily be implemented as a library
> extension, as Boost has shown: <
> http://www.boost.org/doc/libs/1_60_0/libs/core/doc/html/core/noncopyable.html>.
> I don't think they're similar enough to `final` to really want to be
> grammatically the same, either. I suppose I could see standardizing
> boost::noncopyable, though (but I'm not sold either way at the moment).
>

Agreed. If this type of facility is considered important, library solutions
are good enough, though with the change from Boost's facility being that it
would be a CRTP base to avoid potential size bloating (I've tried to push
for this change in Boost before, but there was never enough traction even
though it was an acknowledged issue).

On Sat, Feb 13, 2016 at 11:06 PM, Jim Porter <jvp4846@g.rit.edu> wrote:

> I'm also not sure that the typing saved for the `virtual` case would be
> worth adding new syntax that, in my opinion, is *less* clear than what it's
> replacing. Perhaps that's just because I'm not used to it, though.


Also agreed. I see the utility of the copy/move helpers because they apply
to multiple special member functions and there is at least some subtlety
when doing it manually. I don't immediately see the utility of the virtual
one -- maybe if it made a pure virtual destructor with a definition it
could be argued that it prevents the user from having to define a
destructor out-of-line, but even then there has already been talk of
allowing a pure virtual function to be defined inline in a class
definition, which would accomplish that.

--

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

--001a113cc342cce4c1052bea80bc
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 S=
at, Feb 13, 2016 at 11:06 PM, Jim Porter <span dir=3D"ltr">&lt;<a href=3D"m=
ailto:jvp4846@g.rit.edu" target=3D"_blank">jvp4846@g.rit.edu</a>&gt;</span>=
 wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;=
border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:=
solid;padding-left:1ex">
`uncopyable` and `immovable` could also easily be implemented as a library =
extension, as Boost has shown: &lt;<a href=3D"http://www.boost.org/doc/libs=
/1_60_0/libs/core/doc/html/core/noncopyable.html" rel=3D"noreferrer" target=
=3D"_blank">http://www.boost.org/doc/libs/1_60_0/libs/core/doc/html/core/no=
ncopyable.html</a>&gt;. I don&#39;t think they&#39;re similar enough to `fi=
nal` to really want to be grammatically the same, either. I suppose I could=
 see standardizing boost::noncopyable, though (but I&#39;m not sold either =
way at the moment).<br></blockquote><div><br></div><div>Agreed. If this typ=
e of facility is considered important, library solutions are good enough, t=
hough with the change from Boost&#39;s facility being that it would be a CR=
TP base to avoid potential size bloating (I&#39;ve tried to push for this c=
hange in Boost before, but there was never enough traction even though it w=
as an acknowledged issue).=C2=A0</div><div><br></div><div>On Sat, Feb 13, 2=
016 at 11:06 PM, Jim Porter=C2=A0<span dir=3D"ltr">&lt;<a href=3D"mailto:jv=
p4846@g.rit.edu" target=3D"_blank">jvp4846@g.rit.edu</a>&gt;</span>=C2=A0wr=
ote:=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0=
px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-le=
ft-style:solid;padding-left:1ex">
I&#39;m also not sure that the typing saved for the `virtual` case would be=
 worth adding new syntax that, in my opinion, is *less* clear than what it&=
#39;s replacing. Perhaps that&#39;s just because I&#39;m not used to it, th=
ough.</blockquote><div><br></div><div>Also agreed. I see the utility of the=
 copy/move helpers because they apply to multiple special member functions =
and there is at least some subtlety when doing it manually. I don&#39;t imm=
ediately see the utility of the virtual one -- maybe if it made a pure virt=
ual destructor with a definition it could be argued that it prevents the us=
er from having to define a destructor out-of-line, but even then there has =
already been talk of allowing a pure virtual function to be defined inline =
in a class definition, which would accomplish that.</div></div></div></div>

<p></p>

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

--001a113cc342cce4c1052bea80bc--

.


Author: Nicol Bolas <jmckesson@gmail.com>
Date: Tue, 16 Feb 2016 14:34:08 -0800 (PST)
Raw View
------=_Part_1116_1994387666.1455662048642
Content-Type: multipart/alternative;
 boundary="----=_Part_1117_882153001.1455662048642"

------=_Part_1117_882153001.1455662048642
Content-Type: text/plain; charset=UTF-8



On Tuesday, February 16, 2016 at 5:17:48 PM UTC-5, Matt Calabrese wrote:
>
> On Sat, Feb 13, 2016 at 11:06 PM, Jim Porter <jvp...@g.rit.edu
> <javascript:>> wrote:
>>
>> `uncopyable` and `immovable` could also easily be implemented as a
>> library extension, as Boost has shown: <
>> http://www.boost.org/doc/libs/1_60_0/libs/core/doc/html/core/noncopyable.html>.
>> I don't think they're similar enough to `final` to really want to be
>> grammatically the same, either. I suppose I could see standardizing
>> boost::noncopyable, though (but I'm not sold either way at the moment).
>>
>
> Agreed. If this type of facility is considered important, library
> solutions are good enough, though with the change from Boost's facility
> being that it would be a CRTP base to avoid potential size bloating (I've
> tried to push for this change in Boost before, but there was never enough
> traction even though it was an acknowledged issue).
>

How does the lack of use of the CRTP bloat the size of the type? EBO either
happens or it doesn't; I don't believe the fact that the empty base is a
template helps or hinders this process.

--

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

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

<div dir=3D"ltr"><br><br>On Tuesday, February 16, 2016 at 5:17:48 PM UTC-5,=
 Matt Calabrese 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"><div><div class=3D"gmail_quote">On Sat, Feb 13, 2016 at 11:06 PM, =
Jim Porter <span dir=3D"ltr">&lt;<a href=3D"javascript:" target=3D"_blank" =
gdf-obfuscated-mailto=3D"sFgDlQ5eIAAJ" rel=3D"nofollow" onmousedown=3D"this=
..href=3D&#39;javascript:&#39;;return true;" onclick=3D"this.href=3D&#39;jav=
ascript:&#39;;return true;">jvp...@g.rit.edu</a>&gt;</span> wrote:<blockquo=
te class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-widt=
h:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-le=
ft:1ex">
`uncopyable` and `immovable` could also easily be implemented as a library =
extension, as Boost has shown: &lt;<a href=3D"http://www.boost.org/doc/libs=
/1_60_0/libs/core/doc/html/core/noncopyable.html" rel=3D"nofollow" target=
=3D"_blank" onmousedown=3D"this.href=3D&#39;http://www.google.com/url?q\75h=
ttp%3A%2F%2Fwww.boost.org%2Fdoc%2Flibs%2F1_60_0%2Flibs%2Fcore%2Fdoc%2Fhtml%=
2Fcore%2Fnoncopyable.html\46sa\75D\46sntz\0751\46usg\75AFQjCNE4_QPGMa0B7frB=
p0_gUipjQvDuvw&#39;;return true;" onclick=3D"this.href=3D&#39;http://www.go=
ogle.com/url?q\75http%3A%2F%2Fwww.boost.org%2Fdoc%2Flibs%2F1_60_0%2Flibs%2F=
core%2Fdoc%2Fhtml%2Fcore%2Fnoncopyable.html\46sa\75D\46sntz\0751\46usg\75AF=
QjCNE4_QPGMa0B7frBp0_gUipjQvDuvw&#39;;return true;">http://www.boost.org/do=
c/<wbr>libs/1_60_0/libs/core/doc/<wbr>html/core/noncopyable.html</a>&gt;. I=
 don&#39;t think they&#39;re similar enough to `final` to really want to be=
 grammatically the same, either. I suppose I could see standardizing boost:=
:noncopyable, though (but I&#39;m not sold either way at the moment).<br></=
blockquote><div><br></div><div>Agreed. If this type of facility is consider=
ed important, library solutions are good enough, though with the change fro=
m Boost&#39;s facility being that it would be a CRTP base to avoid potentia=
l size bloating (I&#39;ve tried to push for this change in Boost before, bu=
t there was never enough traction even though it was an acknowledged issue)=
..</div></div></div></div></blockquote><div><br>How does the lack of use of =
the CRTP bloat the size of the type? EBO either happens or it doesn&#39;t; =
I don&#39;t believe the fact that the empty base is a template helps or hin=
ders this process.<br></div></div>

<p></p>

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

------=_Part_1117_882153001.1455662048642--
------=_Part_1116_1994387666.1455662048642--

.


Author: "'Matt Calabrese' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Tue, 16 Feb 2016 17:25:09 -0800
Raw View
--001a113d5b82ecd3e8052bed1e4e
Content-Type: text/plain; charset=UTF-8

On Tue, Feb 16, 2016 at 2:34 PM, Nicol Bolas <jmckesson@gmail.com> wrote:
>
> How does the lack of use of the CRTP bloat the size of the type? EBO
> either happens or it doesn't; I don't believe the fact that the empty base
> is a template helps or hinders this process.
>

Imagine four types:

noncopyable
left
right
child

Say both "left" and "right" inherit from "noncopyable" (basically a
boost::noncopyable). Then, "child" inherits from "left" and "right". The
two "noncopyable" bases are not allowed to occupy the same storage location
in "child", so you can get size bloating that wouldn't have happened had
the user just deleted the copy operations. If each of those "noncopyable"
bases were different types, then EBO can occur. You can get this easily by
using CRTP. Technically, it doesn't have to be strictly CRTP as you can
instantiate the "noncopyable" template with any unique type, but just doing
CRTP with the immediate child is convenient because a given type cannot
(directly) inherit from the same type multiple times, and you don't have to
forward declare and maintain uniqueness of tag types.

A quick example of the size bloating that can occur (noncopyable here
doesn't make the type noncopyable in the example because it's not necessary
to show the size bloating):

//////////
#include <iostream>

struct noncopyable {};

struct left : noncopyable {};
struct right : noncopyable {};

struct child : left, right {};

int main() {
  // Compiler I tested outputs 2 here
  std::cout << sizeof(child) << std::endl;
}
//////////

Now, if you use CRTP...

//////////
#include <iostream>

template <class>
struct noncopyable {};

struct left : noncopyable<left> {};
struct right : noncopyable<right> {};

struct child : left, right {};

int main() {
  // Compiler I tested outputs 1 here
  std::cout << sizeof(child) << std::endl;
}
//////////

Perhaps these concerns are for rare cases, but it's a little bit sad that
the convenience base would potentially have a size impact when all you want
it to do is make something noncopyable.

--

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

--001a113d5b82ecd3e8052bed1e4e
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, Feb 16, 2016 at 2:34 PM, Nicol Bolas <span dir=3D"ltr">&lt;<a href=3D"m=
ailto:jmckesson@gmail.com" target=3D"_blank">jmckesson@gmail.com</a>&gt;</s=
pan> wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.=
8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-st=
yle:solid;padding-left:1ex"><div dir=3D"ltr"><div>How does the lack of use =
of the CRTP bloat the size of the type? EBO either happens or it doesn&#39;=
t; I don&#39;t believe the fact that the empty base is a template helps or =
hinders this process.</div></div></blockquote><div><br></div><div>Imagine f=
our types:</div><div><br></div><div>noncopyable</div><div>left</div><div>ri=
ght</div><div>child</div><div><br></div><div>Say both &quot;left&quot; and =
&quot;right&quot; inherit from &quot;noncopyable&quot; (basically a boost::=
noncopyable). Then, &quot;child&quot; inherits from &quot;left&quot; and &q=
uot;right&quot;. The two &quot;noncopyable&quot; bases are not allowed to o=
ccupy the same storage location in &quot;child&quot;, so you can get size b=
loating that wouldn&#39;t have happened had the user just deleted the copy =
operations. If each of those &quot;noncopyable&quot; bases were different t=
ypes, then EBO can occur. You can get this easily by using CRTP. Technicall=
y, it doesn&#39;t have to be strictly CRTP as you can instantiate the &quot=
;noncopyable&quot; template with any unique type, but just doing CRTP with =
the immediate child is convenient because a given type cannot (directly) in=
herit from the same type multiple times, and you don&#39;t have to forward =
declare and maintain uniqueness of tag types.</div><div><br></div><div>A qu=
ick example of the size bloating that can occur (noncopyable here doesn&#39=
;t make the type noncopyable in the example because it&#39;s not necessary =
to show the size bloating):</div><div><br></div><div>//////////</div><div><=
div>#include &lt;iostream&gt;</div><div><br></div><div>struct noncopyable {=
};</div><div><br></div><div>struct left : noncopyable {};</div><div>struct =
right : noncopyable {};</div><div><br></div><div>struct child : left, right=
 {};</div><div><br></div><div>int main() {</div><div>=C2=A0 // Compiler I t=
ested outputs 2 here</div><div>=C2=A0 std::cout &lt;&lt; sizeof(child) &lt;=
&lt; std::endl;</div><div>}</div></div>//////////</div><div class=3D"gmail_=
quote"><br></div><div class=3D"gmail_quote">Now, if you use CRTP...</div><d=
iv class=3D"gmail_quote"><br></div><div class=3D"gmail_quote"><div>////////=
//</div><div><div>#include &lt;iostream&gt;</div><div><br></div><div>templa=
te &lt;class&gt;</div><div>struct noncopyable {};</div><div><br></div><div>=
struct left : noncopyable&lt;left&gt; {};</div><div>struct right : noncopya=
ble&lt;right&gt; {};</div><div><br></div><div>struct child : left, right {}=
;</div><div><br></div><div>int main() {</div><div>=C2=A0 // Compiler I test=
ed outputs 1 here</div><div>=C2=A0 std::cout &lt;&lt; sizeof(child) &lt;&lt=
; std::endl;</div><div>}</div></div>//////////<br></div><div class=3D"gmail=
_quote"><br></div><div class=3D"gmail_quote">Perhaps these concerns are for=
 rare cases, but it&#39;s a little bit sad that the convenience base would =
potentially have a size impact when all you want it to do is make something=
 noncopyable.</div><div class=3D"gmail_quote"><br></div><div class=3D"gmail=
_quote"><br></div></div></div>

<p></p>

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

--001a113d5b82ecd3e8052bed1e4e--

.


Author: "'Matt Calabrese' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Tue, 16 Feb 2016 17:37:14 -0800
Raw View
--001a113cd1fa2943f9052bed4a4c
Content-Type: text/plain; charset=UTF-8

On Tue, Feb 16, 2016 at 5:25 PM, Matt Calabrese <calabrese@google.com>
wrote:
>
> Perhaps these concerns are for rare cases, but it's a little bit sad that
> the convenience base would potentially have a size impact when all you want
> it to do is make something noncopyable.
>

An example for where this can come up in a less contrived situation --
consider a tuple implementation that tries to keep storage down by using a
base as opposed to a datamember when a given type is empty, such that an
empty type doesn't necessarily contribute to storage of the overall tuple.
In this case, if you had a tuple of a bunch of types that used exactly the
same base "noncopyable" type, the tuple implementation wouldn't be able to
exploit EBO and each logical member would contribute to the overall size of
the tuple. If each of those individual types inherited from an
instantiation of a noncopyable template by way of CRTP, however, or had
simply manually deleted the copy operations, then the tuple type would be
able to exploit EBO.

--

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

--001a113cd1fa2943f9052bed4a4c
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, Feb 16, 2016 at 5:25 PM, Matt Calabrese <span dir=3D"ltr">&lt;<a href=
=3D"mailto:calabrese@google.com" target=3D"_blank">calabrese@google.com</a>=
&gt;</span> wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .=
8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div clas=
s=3D"gmail_extra"><div class=3D"gmail_quote">Perhaps these concerns are for=
 rare cases, but it&#39;s a little bit sad that the convenience base would =
potentially have a size impact when all you want it to do is make something=
 noncopyable.</div></div></div></blockquote><div><br></div><div>An example =
for where this can come up in a less contrived situation -- consider a tupl=
e implementation that tries to keep storage down by using a base as opposed=
 to a datamember when a given type is empty, such that an empty type doesn&=
#39;t necessarily contribute to storage of the overall tuple. In this case,=
 if you had a tuple of a bunch of types that used exactly the same base &qu=
ot;noncopyable&quot; type, the tuple implementation wouldn&#39;t be able to=
 exploit EBO and each logical member would contribute to the overall size o=
f the tuple. If each of those individual types inherited from an instantiat=
ion of a noncopyable template by way of CRTP, however, or had simply manual=
ly deleted the copy operations, then the tuple type would be able to exploi=
t EBO.</div></div><br></div></div>

<p></p>

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

--001a113cd1fa2943f9052bed4a4c--

.


Author: Nicol Bolas <jmckesson@gmail.com>
Date: Tue, 16 Feb 2016 18:28:39 -0800 (PST)
Raw View
------=_Part_7591_1879183403.1455676119172
Content-Type: multipart/alternative;
 boundary="----=_Part_7592_715495024.1455676119172"

------=_Part_7592_715495024.1455676119172
Content-Type: text/plain; charset=UTF-8

On Tuesday, February 16, 2016 at 8:25:12 PM UTC-5, Matt Calabrese wrote:
>
> On Tue, Feb 16, 2016 at 2:34 PM, Nicol Bolas <jmck...@gmail.com
> <javascript:>> wrote:
>>
>> How does the lack of use of the CRTP bloat the size of the type? EBO
>> either happens or it doesn't; I don't believe the fact that the empty base
>> is a template helps or hinders this process.
>>
>
> Imagine four types:
>
> noncopyable
> left
> right
> child
>
> Say both "left" and "right" inherit from "noncopyable" (basically a
> boost::noncopyable). Then, "child" inherits from "left" and "right". The
> two "noncopyable" bases are not allowed to occupy the same storage location
> in "child", so you can get size bloating that wouldn't have happened had
> the user just deleted the copy operations. If each of those "noncopyable"
> bases were different types, then EBO can occur. You can get this easily by
> using CRTP. Technically, it doesn't have to be strictly CRTP as you can
> instantiate the "noncopyable" template with any unique type, but just doing
> CRTP with the immediate child is convenient because a given type cannot
> (directly) inherit from the same type multiple times, and you don't have to
> forward declare and maintain uniqueness of tag types.
>

Good point.

--

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

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

<div dir=3D"ltr">On Tuesday, February 16, 2016 at 8:25:12 PM UTC-5, Matt Ca=
labrese wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-l=
eft: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"=
><div><div class=3D"gmail_quote">On Tue, Feb 16, 2016 at 2:34 PM, Nicol Bol=
as <span dir=3D"ltr">&lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfu=
scated-mailto=3D"_KYEnUhoIAAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D=
&#39;javascript:&#39;;return true;" onclick=3D"this.href=3D&#39;javascript:=
&#39;;return true;">jmck...@gmail.com</a>&gt;</span> wrote:<blockquote clas=
s=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px;b=
order-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"=
><div dir=3D"ltr"><div>How does the lack of use of the CRTP bloat the size =
of the type? EBO either happens or it doesn&#39;t; I don&#39;t believe the =
fact that the empty base is a template helps or hinders this process.</div>=
</div></blockquote><div><br></div><div>Imagine four types:</div><div><br></=
div><div>noncopyable</div><div>left</div><div>right</div><div>child</div><d=
iv><br></div><div>Say both &quot;left&quot; and &quot;right&quot; inherit f=
rom &quot;noncopyable&quot; (basically a boost::noncopyable). Then, &quot;c=
hild&quot; inherits from &quot;left&quot; and &quot;right&quot;. The two &q=
uot;noncopyable&quot; bases are not allowed to occupy the same storage loca=
tion in &quot;child&quot;, so you can get size bloating that wouldn&#39;t h=
ave happened had the user just deleted the copy operations. If each of thos=
e &quot;noncopyable&quot; bases were different types, then EBO can occur. Y=
ou can get this easily by using CRTP. Technically, it doesn&#39;t have to b=
e strictly CRTP as you can instantiate the &quot;noncopyable&quot; template=
 with any unique type, but just doing CRTP with the immediate child is conv=
enient because a given type cannot (directly) inherit from the same type mu=
ltiple times, and you don&#39;t have to forward declare and maintain unique=
ness of tag types.</div></div></div></div></blockquote><br>Good point.<br><=
/div>

<p></p>

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

------=_Part_7592_715495024.1455676119172--
------=_Part_7591_1879183403.1455676119172--

.


Author: Alisdair Meredith <alisdairm@me.com>
Date: Tue, 16 Feb 2016 21:38:40 -0500
Raw View
--Apple-Mail=_9CE97624-F002-49B4-B8F5-4E9793860744
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8


> On Feb 14, 2016, at 2:06 AM, Jim Porter <jvp4846@g.rit.edu> wrote:
>=20
> `uncopyable` and `immovable` could also easily be implemented as a librar=
y extension, as Boost has shown: <http://www.boost.org/doc/libs/1_60_0/libs=
/core/doc/html/core/noncopyable.html>. I don't think they're similar enough=
 to `final` to really want to be grammatically the same, either. I suppose =
I could see standardizing boost::noncopyable, though (but I'm not sold eith=
er way at the moment).
>=20
> I'm also not sure that the typing saved for the `virtual` case would be w=
orth adding new syntax that, in my opinion, is *less* clear than what it's =
replacing. Perhaps that's just because I'm not used to it, though.
>=20
> - Jim

It has been proposed before, for C++11:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2675.pdf <http://w=
ww.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2675.pdf>

The proposal was withdrawn (without a poll) as it was intended to be a
quick-and-simple up/down vote on whether we wanted something as=20
simple as this, and we lost over 30 minutes of full LWG time bike-shedding=
=20
concerns when there were more important issues to nail down, that late
in the process.

I do remember there was some concern about the ABI cost in the case
of multiple inheritance when multiple base classes were implemented
using this technique.

I would certainly welcome an up-to-date proposal for the next Library
Fundamentals TS.

AlisdairM

--=20

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

--Apple-Mail=_9CE97624-F002-49B4-B8F5-4E9793860744
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=
=3Dus-ascii"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode=
: space; -webkit-line-break: after-white-space;" class=3D""><br class=3D"">=
<div><blockquote type=3D"cite" class=3D""><div class=3D"">On Feb 14, 2016, =
at 2:06 AM, Jim Porter &lt;<a href=3D"mailto:jvp4846@g.rit.edu" class=3D"">=
jvp4846@g.rit.edu</a>&gt; wrote:</div><div class=3D""><div class=3D""><br c=
lass=3D"">`uncopyable` and `immovable` could also easily be implemented as =
a library extension, as Boost has shown: &lt;<a href=3D"http://www.boost.or=
g/doc/libs/1_60_0/libs/core/doc/html/core/noncopyable.html" class=3D"">http=
://www.boost.org/doc/libs/1_60_0/libs/core/doc/html/core/noncopyable.html</=
a>&gt;. I don't think they're similar enough to `final` to really want to b=
e grammatically the same, either. I suppose I could see standardizing boost=
::noncopyable, though (but I'm not sold either way at the moment).<br class=
=3D""><br class=3D"">I'm also not sure that the typing saved for the `virtu=
al` case would be worth adding new syntax that, in my opinion, is *less* cl=
ear than what it's replacing. Perhaps that's just because I'm not used to i=
t, though.<br class=3D""><br class=3D"">- Jim<br class=3D""></div></div></b=
lockquote></div><br class=3D""><div class=3D"">It has been proposed before,=
 for C++11:</div><div class=3D""><a href=3D"http://www.open-std.org/jtc1/sc=
22/wg21/docs/papers/2008/n2675.pdf" class=3D"">http://www.open-std.org/jtc1=
/sc22/wg21/docs/papers/2008/n2675.pdf</a></div><div class=3D""><br class=3D=
""></div><div class=3D"">The proposal was withdrawn (without a poll) as it =
was intended to be a</div><div class=3D"">quick-and-simple up/down vote on =
whether we wanted something as&nbsp;</div><div class=3D"">simple as this, a=
nd we lost over 30 minutes of full LWG time bike-shedding&nbsp;</div><div c=
lass=3D"">concerns when there were more important issues to nail down, that=
 late</div><div class=3D"">in the process.</div><div class=3D""><br class=
=3D""></div><div class=3D"">I do remember there was some concern about the =
ABI cost in the case</div><div class=3D"">of multiple inheritance when mult=
iple base classes were implemented</div><div class=3D"">using this techniqu=
e.</div><div class=3D""><br class=3D""></div><div class=3D"">I would certai=
nly welcome an up-to-date proposal for the next Library</div><div class=3D"=
">Fundamentals TS.</div><div class=3D""><br class=3D""></div><div class=3D"=
">AlisdairM</div></body></html>

<p></p>

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

--Apple-Mail=_9CE97624-F002-49B4-B8F5-4E9793860744--

.