Topic: Internal swap-ing mechanism, All types


Author: Christ-Jan Wijtmans <cj.wijtmans@gmail.com>
Date: Sun, 16 Mar 2014 16:39:12 +0100
Raw View
--001a1133e308cb1d8a04f4bb1ad4
Content-Type: text/plain; charset=UTF-8

Replacing struct with class is not a difficult task.  It is anyway a side
suggestion.


Live long and prosper,

Christ-Jan Wijtmans
https://github.com/cjwijtmans
http://facebook.com/cj.wijtmans
http://twitter.com/cjwijtmans


On Sun, Mar 16, 2014 at 4:21 PM, Philipp Maximilian Stephani <
p.stephani2@gmail.com> wrote:

> Such a change (forcing all structs to be POD) would break billions of
> lines of working code and will therefore not happen.
>
>
> On Sun Mar 16 2014 at 12:09:32, Christ-Jan Wijtmans <cj.wijtmans@gmail.com>
> wrote:
>
>> I would like to note that the current behavior could stay for structs so
>> that they stay compatible with C.
>> Also it would keep structs useful for PODs. I would go even so far as to
>> disallow constructors, destructors, virtuals or class members being in
>> structs so that they are guaranteed to be PODs and compatible with C.
>> Making them differentiated from classes with default copy and move
>> behavior that respect RAII.
>>
>> --
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to std-proposals+unsubscribe@isocpp.org.
>>
>> To post to this group, send email to std-proposals@isocpp.org.
>> Visit this group at
>> http://groups.google.com/a/isocpp.org/group/std-proposals/.
>>
>  --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/a/isocpp.org/d/topic/std-proposals/40i99Eqtt3I/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> std-proposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> Visit this group at
> http://groups.google.com/a/isocpp.org/group/std-proposals/.
>

--

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

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

<div dir=3D"ltr">Replacing struct with class is not a difficult task. =C2=
=A0It is anyway a side suggestion.</div><div class=3D"gmail_extra"><br clea=
r=3D"all"><div><div dir=3D"ltr"><br>Live long and prosper,<br><br>Christ-Ja=
n Wijtmans<br>
<a href=3D"https://github.com/cjwijtmans" target=3D"_blank">https://github.=
com/cjwijtmans</a><br><a href=3D"http://facebook.com/cj.wijtmans" target=3D=
"_blank">http://facebook.com/cj.wijtmans</a><br><a href=3D"http://twitter.c=
om/cjwijtmans" target=3D"_blank">http://twitter.com/cjwijtmans</a></div>
</div>
<br><br><div class=3D"gmail_quote">On Sun, Mar 16, 2014 at 4:21 PM, Philipp=
 Maximilian Stephani <span dir=3D"ltr">&lt;<a href=3D"mailto:p.stephani2@gm=
ail.com" target=3D"_blank">p.stephani2@gmail.com</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">
Such a change (forcing all structs to be POD) would break billions of lines=
 of working code and will therefore not happen.<div class=3D""><br><br><div=
>On Sun Mar 16 2014 at 12:09:32, Christ-Jan Wijtmans &lt;<a href=3D"mailto:=
cj.wijtmans@gmail.com" target=3D"_blank">cj.wijtmans@gmail.com</a>&gt; wrot=
e:</div>

</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-l=
eft:1px #ccc solid;padding-left:1ex"><div class=3D""><div dir=3D"ltr">I wou=
ld like to note that the current behavior could stay for structs so that th=
ey stay compatible with C.<br>

Also it would keep structs useful for PODs. I would go even so far as to di=
sallow constructors, destructors, virtuals or class members being in struct=
s so that they are guaranteed to be PODs and compatible with C.<br>Making t=
hem differentiated from classes with default copy and move behavior that re=
spect RAII.</div>



<p></p>

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

<p></p>

-- <br>
<br>
--- <br>
You received this message because you are subscribed to a topic in the Goog=
le Groups &quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this topic, visit <a href=3D"https://groups.google.com/=
a/isocpp.org/d/topic/std-proposals/40i99Eqtt3I/unsubscribe" target=3D"_blan=
k">https://groups.google.com/a/isocpp.org/d/topic/std-proposals/40i99Eqtt3I=
/unsubscribe</a>.<br>

To unsubscribe from this group and all its topics, send an email to <a href=
=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_blank">std-prop=
osals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><br></div>

<p></p>

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

--001a1133e308cb1d8a04f4bb1ad4--

.


Author: Christ-Jan Wijtmans <cj.wijtmans@gmail.com>
Date: Sun, 16 Mar 2014 16:40:32 +0100
Raw View
--001a11380ac4970a9d04f4bb1fcc
Content-Type: text/plain; charset=UTF-8

And anyway i do not believe new C++ standards should be held back by such
trivial things, even if you had a 100 structs that will error it only takes
a few minutes replacing it with class.


Live long and prosper,

Christ-Jan Wijtmans
https://github.com/cjwijtmans
http://facebook.com/cj.wijtmans
http://twitter.com/cjwijtmans


On Sun, Mar 16, 2014 at 4:39 PM, Christ-Jan Wijtmans
<cj.wijtmans@gmail.com>wrote:

> Replacing struct with class is not a difficult task.  It is anyway a side
> suggestion.
>
>
> Live long and prosper,
>
> Christ-Jan Wijtmans
> https://github.com/cjwijtmans
> http://facebook.com/cj.wijtmans
> http://twitter.com/cjwijtmans
>
>
> On Sun, Mar 16, 2014 at 4:21 PM, Philipp Maximilian Stephani <
> p.stephani2@gmail.com> wrote:
>
>> Such a change (forcing all structs to be POD) would break billions of
>> lines of working code and will therefore not happen.
>>
>>
>> On Sun Mar 16 2014 at 12:09:32, Christ-Jan Wijtmans <
>> cj.wijtmans@gmail.com> wrote:
>>
>>> I would like to note that the current behavior could stay for structs so
>>> that they stay compatible with C.
>>> Also it would keep structs useful for PODs. I would go even so far as to
>>> disallow constructors, destructors, virtuals or class members being in
>>> structs so that they are guaranteed to be PODs and compatible with C.
>>> Making them differentiated from classes with default copy and move
>>> behavior that respect RAII.
>>>
>>> --
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "ISO C++ Standard - Future Proposals" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to std-proposals+unsubscribe@isocpp.org.
>>>
>>> To post to this group, send email to std-proposals@isocpp.org.
>>> Visit this group at
>>> http://groups.google.com/a/isocpp.org/group/std-proposals/.
>>>
>>  --
>>
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/a/isocpp.org/d/topic/std-proposals/40i99Eqtt3I/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to
>> std-proposals+unsubscribe@isocpp.org.
>> To post to this group, send email to std-proposals@isocpp.org.
>> Visit this group at
>> http://groups.google.com/a/isocpp.org/group/std-proposals/.
>>
>
>

--

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

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

<div dir=3D"ltr">And anyway i do not believe new C++ standards should be he=
ld back by such trivial things, even if you had a 100 structs that will err=
or it only takes a few minutes replacing it with class.</div><div class=3D"=
gmail_extra">
<br clear=3D"all"><div><div dir=3D"ltr"><br>Live long and prosper,<br><br>C=
hrist-Jan Wijtmans<br><a href=3D"https://github.com/cjwijtmans" target=3D"_=
blank">https://github.com/cjwijtmans</a><br><a href=3D"http://facebook.com/=
cj.wijtmans" target=3D"_blank">http://facebook.com/cj.wijtmans</a><br>
<a href=3D"http://twitter.com/cjwijtmans" target=3D"_blank">http://twitter.=
com/cjwijtmans</a></div></div>
<br><br><div class=3D"gmail_quote">On Sun, Mar 16, 2014 at 4:39 PM, Christ-=
Jan Wijtmans <span dir=3D"ltr">&lt;<a href=3D"mailto:cj.wijtmans@gmail.com"=
 target=3D"_blank">cj.wijtmans@gmail.com</a>&gt;</span> wrote:<br><blockquo=
te class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc so=
lid;padding-left:1ex">
<div dir=3D"ltr">Replacing struct with class is not a difficult task. =C2=
=A0It is anyway a side suggestion.</div><div class=3D"gmail_extra"><br clea=
r=3D"all"><div><div dir=3D"ltr"><br>Live long and prosper,<br><br>Christ-Ja=
n Wijtmans<br>

<a href=3D"https://github.com/cjwijtmans" target=3D"_blank">https://github.=
com/cjwijtmans</a><br><a href=3D"http://facebook.com/cj.wijtmans" target=3D=
"_blank">http://facebook.com/cj.wijtmans</a><br><a href=3D"http://twitter.c=
om/cjwijtmans" target=3D"_blank">http://twitter.com/cjwijtmans</a></div>

</div><div><div class=3D"h5">
<br><br><div class=3D"gmail_quote">On Sun, Mar 16, 2014 at 4:21 PM, Philipp=
 Maximilian Stephani <span dir=3D"ltr">&lt;<a href=3D"mailto:p.stephani2@gm=
ail.com" target=3D"_blank">p.stephani2@gmail.com</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">

Such a change (forcing all structs to be POD) would break billions of lines=
 of working code and will therefore not happen.<div><br><br><div>On Sun Mar=
 16 2014 at 12:09:32, Christ-Jan Wijtmans &lt;<a href=3D"mailto:cj.wijtmans=
@gmail.com" target=3D"_blank">cj.wijtmans@gmail.com</a>&gt; wrote:</div>


</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-l=
eft:1px #ccc solid;padding-left:1ex"><div><div dir=3D"ltr">I would like to =
note that the current behavior could stay for structs so that they stay com=
patible with C.<br>


Also it would keep structs useful for PODs. I would go even so far as to di=
sallow constructors, destructors, virtuals or class members being in struct=
s so that they are guaranteed to be PODs and compatible with C.<br>Making t=
hem differentiated from classes with default copy and move behavior that re=
spect RAII.</div>




<p></p>

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

<p></p>

-- <br>
<br>
--- <br>
You received this message because you are subscribed to a topic in the Goog=
le Groups &quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this topic, visit <a href=3D"https://groups.google.com/=
a/isocpp.org/d/topic/std-proposals/40i99Eqtt3I/unsubscribe" target=3D"_blan=
k">https://groups.google.com/a/isocpp.org/d/topic/std-proposals/40i99Eqtt3I=
/unsubscribe</a>.<br>


To unsubscribe from this group and all its topics, send an email to <a href=
=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_blank">std-prop=
osals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><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"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--001a11380ac4970a9d04f4bb1fcc--

.


Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Sun, 16 Mar 2014 17:50:32 +0200
Raw View
On 16 March 2014 17:40, Christ-Jan Wijtmans <cj.wijtmans@gmail.com> wrote:
> And anyway i do not believe new C++ standards should be held back by such
> trivial things, even if you had a 100 structs that will error it only takes
> a few minutes replacing it with class.


A few minutes? Perhaps with a refactoring tool that includes a C++
implementation.
Changing

struct derived : base {
    string data;
};

to a class requires the insertion of 'public' and 'public:' in the
right places. I have no
intention to spend that few minutes changing valid code that would be
broken on a whim by
a sudden desire to make all structs PODs.

--

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

.