Topic: Components" template with implicitly defined
Author: "'Walt Karas' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Sun, 28 Feb 2016 15:21:16 -0800 (PST)
Raw View
------=_Part_436_1868772077.1456701676211
Content-Type: multipart/alternative;
boundary="----=_Part_437_452088312.1456701676211"
------=_Part_437_452088312.1456701676211
Content-Type: text/plain; charset=UTF-8
In addition to comparison operators, this feature would be also useful to
implement default << and >> iostream operators. It could also be used to
automatically generate endiance swapping functions for memcopyable
structures sent as messages in datagrams between CPUs of differing
endiance. It could potentially have uses whenever structures are used as
heterogeneous vectors, where there are useful operations on the vector that
consist of performing the corresponding operation on each element of the
vector. For example, vector addition.
--
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/e28b4bef-7439-420e-bc4f-9ec2880cdbc7%40isocpp.org.
------=_Part_437_452088312.1456701676211
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">In addition to comparison operators, this feature would be=
also useful to implement default << and >> iostream operators.=
=C2=A0 It could also be used to automatically generate endiance swapping fu=
nctions for memcopyable structures sent as messages in datagrams between CP=
Us of differing endiance.=C2=A0 It could potentially have uses whenever str=
uctures are used as heterogeneous vectors, where there are useful operation=
s on the vector that consist of performing the corresponding operation on e=
ach element of the vector.=C2=A0 For example, vector addition.<br><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/e28b4bef-7439-420e-bc4f-9ec2880cdbc7%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/e28b4bef-7439-420e-bc4f-9ec2880cdbc7=
%40isocpp.org</a>.<br />
------=_Part_437_452088312.1456701676211--
------=_Part_436_1868772077.1456701676211--
.
Author: "'Walt Karas' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Tue, 1 Mar 2016 07:05:51 -0800 (PST)
Raw View
------=_Part_4831_49959814.1456844751176
Content-Type: multipart/alternative;
boundary="----=_Part_4832_206311370.1456844751386"
------=_Part_4832_206311370.1456844751386
Content-Type: text/plain; charset=UTF-8
Another use for this feature would be to provide a reasonable default for
std::hash .
--
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/e1fa7a5e-36a3-49fb-b438-bc00b68ef661%40isocpp.org.
------=_Part_4832_206311370.1456844751386
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Another use for this feature would be to provide a reasona=
ble default for std::hash .<br><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/e1fa7a5e-36a3-49fb-b438-bc00b68ef661%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/e1fa7a5e-36a3-49fb-b438-bc00b68ef661=
%40isocpp.org</a>.<br />
------=_Part_4832_206311370.1456844751386--
------=_Part_4831_49959814.1456844751176--
.
Author: "'Walt Karas' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Wed, 2 Mar 2016 16:50:51 -0800 (PST)
Raw View
------=_Part_138_1660235006.1456966251605
Content-Type: multipart/alternative;
boundary="----=_Part_139_1230542507.1456966251605"
------=_Part_139_1230542507.1456966251605
Content-Type: text/plain; charset=UTF-8
On second thought, Components should be an implicitly defined (public)
member class template of every class. This makes more sense, since it
needs member access to the class.
template <
template <typename Member_type, Member_type A::*mptr> class Op,
typename Param>
struct Components
{
bool operator () (Param ¶m)
{
...
}
};
Default operator == changes to:
template <class Target>
bool operator == (const Target &op1, const Target &op2)
{
Equality_param<Target> param(op1, op2);
typename Target::template
Components<Equality_op<Target>::template Op, Equality_param<Target> >
c;
return(c(param));
}
--
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/fccab40e-bfe8-49e0-ad12-2a2ac28b28a6%40isocpp.org.
------=_Part_139_1230542507.1456966251605
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On second thought, Components should be an implicitly defi=
ned (public) member class template of every class.=C2=A0 This makes more se=
nse, since it needs member access to the class.<br><br>template <<br>=C2=
=A0 template <typename Member_type, Member_type A::*mptr> class Op,<b=
r>=C2=A0 typename Param><br>struct Components<br>=C2=A0 {<br>=C2=A0=C2=
=A0=C2=A0 bool operator () (Param &param)<br>=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 {<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ...<br>=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 }<br>=C2=A0 };<br><br>Default operator =3D=3D changes to:<br><br>tem=
plate <class Target><br>bool operator =3D=3D (const Target &op1, =
const Target &op2)<br>=C2=A0 {<br>=C2=A0=C2=A0=C2=A0 Equality_param<=
Target> param(op1, op2);<br><br>=C2=A0=C2=A0=C2=A0 typename Target::temp=
late<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Components<Equality_op<Target&=
gt;::template Op, Equality_param<Target> > c;<br><br>=C2=A0=C2=A0=
=C2=A0 return(c(param));<br>=C2=A0 }<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/fccab40e-bfe8-49e0-ad12-2a2ac28b28a6%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/fccab40e-bfe8-49e0-ad12-2a2ac28b28a6=
%40isocpp.org</a>.<br />
------=_Part_139_1230542507.1456966251605--
------=_Part_138_1660235006.1456966251605--
.
Author: "'Walt Karas' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Thu, 3 Mar 2016 21:01:14 -0800 (PST)
Raw View
------=_Part_369_153204546.1457067674823
Content-Type: multipart/alternative;
boundary="----=_Part_370_661324883.1457067674823"
------=_Part_370_661324883.1457067674823
Content-Type: text/plain; charset=UTF-8
Another possible approach generic mapping of operations to components would
be to accept the idiom ++C , C a class name, as a template parameter. The
compiler would implicitly expand ++C to multiple parameters, namely C
itself, followed by a pair of parameters for each component of C. Each
pair would consist of the type T of the component, followed by the member
pointer of type T C::* to the component. (The reason for using ++ is to
suggest iteration of over the components.) For example, for this class:
struct A { int i, j; double x; };
the template instantiation:
X<++A>
would be equivalent to:
X<A, int, &C::i, int, &C::j, double, &C::x>
This hopefully would allow variadic templates to create reasonable default
comparison, input and display, persistence, endiance swap, hashing, etc.
operations for many classes. A difficult issue would be wether the context
where X<++A> is instantiated would be required to have access to all the
implicitly reverenced component types and components themselves.
Perhaps the compiler could also except the idiomatic template parameter
--C, which would lay out the components in reverse order (of destruction)
rather than forward order (of construction).
--
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/92a6bfcf-0100-40b2-8946-a9c634783ec9%40isocpp.org.
------=_Part_370_661324883.1457067674823
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Another possible approach generic mapping of operations to=
components would be to accept the idiom ++C , C a class name, as a templat=
e parameter.=C2=A0 The compiler would implicitly expand ++C to multiple par=
ameters, namely C itself, followed by a pair of parameters for each compone=
nt of C.=C2=A0 Each pair would consist of=C2=A0 the type T of the component=
, followed by the member pointer of type T C::* to the component.=C2=A0 (Th=
e reason for using ++ is to suggest iteration of over the components.)=C2=
=A0 For example, for this class:<br><br>struct A { int i, j; double x; };<b=
r><br>the template instantiation:<br><br>X<++A><br><br>would be equiv=
alent to:<br><br>X<A, int, &C::i, int, &C::j, double, &C::x&=
gt;<br><br>This hopefully would allow variadic templates to create reasonab=
le default comparison, input and display, persistence, endiance swap, hashi=
ng, etc. operations for many classes.=C2=A0 A difficult issue would be weth=
er the context where X<++A> is instantiated would be required to have=
access to all the implicitly reverenced component types and components the=
mselves.<br><br>Perhaps the compiler could also except the idiomatic templa=
te parameter --C, which would lay out the components in reverse order (of d=
estruction) rather than forward order (of construction).<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/92a6bfcf-0100-40b2-8946-a9c634783ec9%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/92a6bfcf-0100-40b2-8946-a9c634783ec9=
%40isocpp.org</a>.<br />
------=_Part_370_661324883.1457067674823--
------=_Part_369_153204546.1457067674823--
.
Author: Cleiton Santoia <cleitonsantoia@gmail.com>
Date: Fri, 4 Mar 2016 10:02:43 -0800 (PST)
Raw View
------=_Part_1177_328122249.1457114563966
Content-Type: multipart/alternative;
boundary="----=_Part_1178_1609385642.1457114563967"
------=_Part_1178_1609385642.1457114563967
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Reflection ? p0255r0=20
<http://open-std.org/JTC1/SC22/WG21/docs/papers/2016/p0255r0.pdf>
X<typedef<A>...> solves your case....
Em sexta-feira, 4 de mar=C3=A7o de 2016 02:01:15 UTC-3, Walt Karas escreveu=
:
>
> Another possible approach generic mapping of operations to components=20
> would be to accept the idiom ++C , C a class name, as a template=20
> parameter. The compiler would implicitly expand ++C to multiple=20
> parameters, namely C itself, followed by a pair of parameters for each=20
> component of C. Each pair would consist of the type T of the component,=
=20
> followed by the member pointer of type T C::* to the component. (The=20
> reason for using ++ is to suggest iteration of over the components.) For=
=20
> example, for this class:
>
> struct A { int i, j; double x; };
>
> the template instantiation:
>
> X<++A>
>
> would be equivalent to:
>
> X<A, int, &C::i, int, &C::j, double, &C::x>
>
> This hopefully would allow variadic templates to create reasonable defaul=
t=20
> comparison, input and display, persistence, endiance swap, hashing, etc.=
=20
> operations for many classes. A difficult issue would be wether the conte=
xt=20
> where X<++A> is instantiated would be required to have access to all the=
=20
> implicitly reverenced component types and components themselves.
>
> Perhaps the compiler could also except the idiomatic template parameter=
=20
> --C, which would lay out the components in reverse order (of destruction)=
=20
> rather than forward order (of construction).
>
--=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/3c8bb230-c83b-4c18-95b6-1cc32caae76d%40isocpp.or=
g.
------=_Part_1178_1609385642.1457114563967
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div><br></div>=C2=A0 =C2=A0Reflection ?=C2=A0<a href=3D"h=
ttp://open-std.org/JTC1/SC22/WG21/docs/papers/2016/p0255r0.pdf">p0255r0</a>=
<div><br></div><div>X<typedef<A>...> solves your case....</div>=
<div><br></div><div><br></div><div><br><br>Em sexta-feira, 4 de mar=C3=A7o =
de 2016 02:01:15 UTC-3, Walt Karas escreveu:<blockquote class=3D"gmail_quo=
te" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;paddi=
ng-left: 1ex;"><div dir=3D"ltr">Another possible approach generic mapping o=
f operations to components would be to accept the idiom ++C , C a class nam=
e, as a template parameter.=C2=A0 The compiler would implicitly expand ++C =
to multiple parameters, namely C itself, followed by a pair of parameters f=
or each component of C.=C2=A0 Each pair would consist of=C2=A0 the type T o=
f the component, followed by the member pointer of type T C::* to the compo=
nent.=C2=A0 (The reason for using ++ is to suggest iteration of over the co=
mponents.)=C2=A0 For example, for this class:<br><br>struct A { int i, j; d=
ouble x; };<br><br>the template instantiation:<br><br>X<++A><br><br>w=
ould be equivalent to:<br><br>X<A, int, &C::i, int, &C::j, doubl=
e, &C::x><br><br>This hopefully would allow variadic templates to cr=
eate reasonable default comparison, input and display, persistence, endianc=
e swap, hashing, etc. operations for many classes.=C2=A0 A difficult issue =
would be wether the context where X<++A> is instantiated would be req=
uired to have access to all the implicitly reverenced component types and c=
omponents themselves.<br><br>Perhaps the compiler could also except the idi=
omatic template parameter --C, which would lay out the components in revers=
e order (of destruction) rather than forward order (of construction).<br></=
div></blockquote></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/3c8bb230-c83b-4c18-95b6-1cc32caae76d%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/3c8bb230-c83b-4c18-95b6-1cc32caae76d=
%40isocpp.org</a>.<br />
------=_Part_1178_1609385642.1457114563967--
------=_Part_1177_328122249.1457114563966--
.
Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Fri, 4 Mar 2016 20:26:55 +0100
Raw View
Le 27/02/2016 22:18, 'Walt Karas' via ISO C++ Standard - Future=20
Proposals a =C3=A9crit :
Hi,
please start your post by a summary of what you are trying to solve.
Are you aware of
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4475.pdf
Are you proposing an alternative?
Vicente
--=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/56D9E17F.2070202%40wanadoo.fr.
.
Author: "'Walt Karas' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Fri, 4 Mar 2016 11:48:07 -0800 (PST)
Raw View
------=_Part_1228_1211116281.1457120887341
Content-Type: multipart/alternative;
boundary="----=_Part_1229_67359125.1457120887341"
------=_Part_1229_67359125.1457120887341
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
I'm a complete beginner with variadic templates. I think the equivalent=20
with your proposal is maybe:
template <class Target_, typename Member_type_, Member_type_ Target_::*=20
mptr_>
struct A_component
{
Target_ Target;
Member_type_ Member_type;
static const Target::Member_type *mptr =3D mptr_
};
#define COMPONENTS(C) A_component<C, typename<C, is_member_object_pointer=
=20
|| is_parent>, typedef<C, is_member_object_pointer || is_parent> >...
But still there is the issue of needing member pointers to parent/base=20
classes.
On Friday, March 4, 2016 at 1:02:44 PM UTC-5, Cleiton Santoia wrote:
>
>
> Reflection ? p0255r0=20
> <http://open-std.org/JTC1/SC22/WG21/docs/papers/2016/p0255r0.pdf>
>
> X<typedef<A>...> solves your case....
>
>
>
>
> Em sexta-feira, 4 de mar=C3=A7o de 2016 02:01:15 UTC-3, Walt Karas escrev=
eu:
>>
>> Another possible approach generic mapping of operations to components=20
>> would be to accept the idiom ++C , C a class name, as a template=20
>> parameter. The compiler would implicitly expand ++C to multiple=20
>> parameters, namely C itself, followed by a pair of parameters for each=
=20
>> component of C. Each pair would consist of the type T of the component=
,=20
>> followed by the member pointer of type T C::* to the component. (The=20
>> reason for using ++ is to suggest iteration of over the components.) Fo=
r=20
>> example, for this class:
>>
>> struct A { int i, j; double x; };
>>
>> the template instantiation:
>>
>> X<++A>
>>
>> would be equivalent to:
>>
>> X<A, int, &C::i, int, &C::j, double, &C::x>
>>
>> This hopefully would allow variadic templates to create reasonable=20
>> default comparison, input and display, persistence, endiance swap, hashi=
ng,=20
>> etc. operations for many classes. A difficult issue would be wether the=
=20
>> context where X<++A> is instantiated would be required to have access to=
=20
>> all the implicitly reverenced component types and components themselves.
>>
>> Perhaps the compiler could also except the idiomatic template parameter=
=20
>> --C, which would lay out the components in reverse order (of destruction=
)=20
>> rather than forward order (of construction).
>>
>
--=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/7db63114-8e12-4d38-94e4-39f0061362de%40isocpp.or=
g.
------=_Part_1229_67359125.1457120887341
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">I'm a complete beginner with variadic templates.=C2=A0=
I think the equivalent with your proposal is maybe:<br><br>template <cl=
ass Target_, typename Member_type_, Member_type_ Target_::* mptr_><br>st=
ruct A_component<br>=C2=A0 {<br>=C2=A0=C2=A0=C2=A0 Target_ Target;<br>=C2=
=A0=C2=A0=C2=A0 Member_type_ Member_type;<br>=C2=A0=C2=A0=C2=A0 static cons=
t Target::Member_type *mptr =3D mptr_<br>=C2=A0 };<br><br>#define COMPONENT=
S(C) A_component<C, typename<C, is_member_object_pointer || is_parent=
>, typedef<C, is_member_object_pointer || is_parent> >...<br><b=
r>But still there is the issue of needing member pointers to parent/base cl=
asses.<br><br>On Friday, March 4, 2016 at 1:02:44 PM UTC-5, Cleiton Santoia=
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><=
br></div>=C2=A0 =C2=A0Reflection ?=C2=A0<a href=3D"http://open-std.org/JTC1=
/SC22/WG21/docs/papers/2016/p0255r0.pdf" target=3D"_blank" rel=3D"nofollow"=
onmousedown=3D"this.href=3D'http://www.google.com/url?q\75http%3A%2F%2=
Fopen-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F2016%2Fp0255r0.pdf\46s=
a\75D\46sntz\0751\46usg\75AFQjCNFkSi3VdFDFaygG2yLv-eC_hWmqFg';return tr=
ue;" onclick=3D"this.href=3D'http://www.google.com/url?q\75http%3A%2F%2=
Fopen-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F2016%2Fp0255r0.pdf\46s=
a\75D\46sntz\0751\46usg\75AFQjCNFkSi3VdFDFaygG2yLv-eC_hWmqFg';return tr=
ue;">p0255r0</a><div><br></div><div>X<typedef<A>...> solves you=
r case....</div><div><br></div><div><br></div><div><br><br>Em sexta-feira, =
4 de mar=C3=A7o de 2016 02:01:15 UTC-3, Walt Karas escreveu:<blockquote cl=
ass=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #cc=
c solid;padding-left:1ex"><div dir=3D"ltr">Another possible approach generi=
c mapping of operations to components would be to accept the idiom ++C , C =
a class name, as a template parameter.=C2=A0 The compiler would implicitly =
expand ++C to multiple parameters, namely C itself, followed by a pair of p=
arameters for each component of C.=C2=A0 Each pair would consist of=C2=A0 t=
he type T of the component, followed by the member pointer of type T C::* t=
o the component.=C2=A0 (The reason for using ++ is to suggest iteration of =
over the components.)=C2=A0 For example, for this class:<br><br>struct A { =
int i, j; double x; };<br><br>the template instantiation:<br><br>X<++A&g=
t;<br><br>would be equivalent to:<br><br>X<A, int, &C::i, int, &=
C::j, double, &C::x><br><br>This hopefully would allow variadic temp=
lates to create reasonable default comparison, input and display, persisten=
ce, endiance swap, hashing, etc. operations for many classes.=C2=A0 A diffi=
cult issue would be wether the context where X<++A> is instantiated w=
ould be required to have access to all the implicitly reverenced component =
types and components themselves.<br><br>Perhaps the compiler could also exc=
ept the idiomatic template parameter --C, which would lay out the component=
s in reverse order (of destruction) rather than forward order (of construct=
ion).<br></div></blockquote></div></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/7db63114-8e12-4d38-94e4-39f0061362de%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/7db63114-8e12-4d38-94e4-39f0061362de=
%40isocpp.org</a>.<br />
------=_Part_1229_67359125.1457120887341--
------=_Part_1228_1211116281.1457120887341--
.
Author: "'Walt Karas' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Fri, 4 Mar 2016 11:53:25 -0800 (PST)
Raw View
------=_Part_1222_349134248.1457121205890
Content-Type: multipart/alternative;
boundary="----=_Part_1223_1389691910.1457121205890"
------=_Part_1223_1389691910.1457121205890
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Personally I'm more interested in a generic endiance-swap function=20
template. The books will be open in 2017, new features will be made, I'm=
=20
selfishly thinking of the needs on my own turf. But why not do it in a way=
=20
that is more general, provides for multiple needs?
On Friday, March 4, 2016 at 2:26:58 PM UTC-5, Vicente J. Botet Escriba=20
wrote:
>
>
> Le 27/02/2016 22:18, 'Walt Karas' via ISO C++ Standard - Future=20
> Proposals a =C3=A9crit :=20
>
> Hi,=20
>
> please start your post by a summary of what you are trying to solve.=20
>
> Are you aware of=20
>
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4475.pdf=20
>
> Are you proposing an alternative?=20
>
>
> Vicente=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/2b0bcca0-0939-49f7-939b-4d688f8dfe34%40isocpp.or=
g.
------=_Part_1223_1389691910.1457121205890
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Personally I'm more interested in a generic endiance-s=
wap function template.=C2=A0 The books will be open in 2017, new features w=
ill be made, I'm selfishly thinking of the needs on my own turf.=C2=A0 =
But why not do it in a way that is more general, provides for multiple need=
s?<br><br>On Friday, March 4, 2016 at 2:26:58 PM UTC-5, Vicente J. Botet Es=
criba wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-lef=
t: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">
<br>Le 27/02/2016 22:18, 'Walt Karas' via ISO C++ Standard - Future=
=20
<br>Proposals a =C3=A9crit :
<br>
<br>Hi,
<br>
<br>please start your post by a summary of what you are trying to solve.
<br>
<br>Are you aware of
<br>
<br><a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n447=
5.pdf" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D'h=
ttp://www.google.com/url?q\75http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2F=
wg21%2Fdocs%2Fpapers%2F2015%2Fn4475.pdf\46sa\75D\46sntz\0751\46usg\75AFQjCN=
EN9hkR1Mx1bwyYCBd44bXPtlD6Aw';return true;" onclick=3D"this.href=3D'=
;http://www.google.com/url?q\75http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%=
2Fwg21%2Fdocs%2Fpapers%2F2015%2Fn4475.pdf\46sa\75D\46sntz\0751\46usg\75AFQj=
CNEN9hkR1Mx1bwyYCBd44bXPtlD6Aw';return true;">http://www.open-std.org/j=
tc1/<wbr>sc22/wg21/docs/papers/2015/<wbr>n4475.pdf</a>
<br>
<br>Are you proposing an alternative?
<br>
<br>
<br>Vicente
<br></blockquote></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/2b0bcca0-0939-49f7-939b-4d688f8dfe34%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/2b0bcca0-0939-49f7-939b-4d688f8dfe34=
%40isocpp.org</a>.<br />
------=_Part_1223_1389691910.1457121205890--
------=_Part_1222_349134248.1457121205890--
.
Author: Nicol Bolas <jmckesson@gmail.com>
Date: Fri, 4 Mar 2016 17:22:12 -0800 (PST)
Raw View
------=_Part_1509_862200627.1457140932294
Content-Type: multipart/alternative;
boundary="----=_Part_1510_30117902.1457140932294"
------=_Part_1510_30117902.1457140932294
Content-Type: text/plain; charset=UTF-8
On Friday, March 4, 2016 at 2:53:26 PM UTC-5, Walt Karas wrote:
>
> Personally I'm more interested in a generic endiance-swap function
> template. The books will be open in 2017, new features will be made, I'm
> selfishly thinking of the needs on my own turf. But why not do it in a way
> that is more general, provides for multiple needs?
>
Yes... that's what *reflection* will do. Your way is the more special-case
and restrictive way.
--
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/324dbff9-84da-46f2-b2f3-3d9fe0cc2082%40isocpp.org.
------=_Part_1510_30117902.1457140932294
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On Friday, March 4, 2016 at 2:53:26 PM UTC-5, Walt Karas w=
rote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8e=
x;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">Personal=
ly I'm more interested in a generic endiance-swap function template.=C2=
=A0 The books will be open in 2017, new features will be made, I'm self=
ishly thinking of the needs on my own turf.=C2=A0 But why not do it in a wa=
y that is more general, provides for multiple needs?</div></blockquote><div=
><br>Yes... that's what <i>reflection</i> will do. Your way is the more=
special-case and restrictive way.<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/324dbff9-84da-46f2-b2f3-3d9fe0cc2082%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/324dbff9-84da-46f2-b2f3-3d9fe0cc2082=
%40isocpp.org</a>.<br />
------=_Part_1510_30117902.1457140932294--
------=_Part_1509_862200627.1457140932294--
.
Author: "'Walt Karas' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Fri, 4 Mar 2016 18:08:53 -0800 (PST)
Raw View
------=_Part_384_1920701782.1457143733283
Content-Type: multipart/alternative;
boundary="----=_Part_385_1286024378.1457143733284"
------=_Part_385_1286024378.1457143733284
Content-Type: text/plain; charset=UTF-8
On Friday, March 4, 2016 at 8:22:12 PM UTC-5, Nicol Bolas wrote:
>
> On Friday, March 4, 2016 at 2:53:26 PM UTC-5, Walt Karas wrote:
>>
>> Personally I'm more interested in a generic endiance-swap function
>> template. The books will be open in 2017, new features will be made, I'm
>> selfishly thinking of the needs on my own turf. But why not do it in a way
>> that is more general, provides for multiple needs?
>>
>
> Yes... that's what *reflection* will do. Your way is the more
> special-case and restrictive way.
>
Are there other papers proposing support for reflection, besides p0255r0 ?
<http://www.google.com/url?q=http%3A%2F%2Fopen-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F2016%2Fp0255r0.pdf&sa=D&sntz=1&usg=AFQjCNFkSi3VdFDFaygG2yLv-eC_hWmqFg>
--
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/cc5a1d38-d1f0-4e41-9ee1-29bad95bb15e%40isocpp.org.
------=_Part_385_1286024378.1457143733284
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br>On Friday, March 4, 2016 at 8:22:12 PM UTC-5, Nico=
l Bolas 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"=
>On Friday, March 4, 2016 at 2:53:26 PM UTC-5, Walt Karas 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">Personally I'm more inter=
ested in a generic endiance-swap function template.=C2=A0 The books will be=
open in 2017, new features will be made, I'm selfishly thinking of the=
needs on my own turf.=C2=A0 But why not do it in a way that is more genera=
l, provides for multiple needs?</div></blockquote><div><br>Yes... that'=
s what <i>reflection</i> will do. Your way is the more special-case and res=
trictive way.<br></div></div></blockquote><div><br>Are there other papers p=
roposing support for reflection, besides <a href=3D"http://www.google.com/u=
rl?q=3Dhttp%3A%2F%2Fopen-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F201=
6%2Fp0255r0.pdf&sa=3DD&sntz=3D1&usg=3DAFQjCNFkSi3VdFDFaygG2yLv-=
eC_hWmqFg" target=3D"_blank" rel=3D"nofollow">p0255r0 ?<br></a></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/cc5a1d38-d1f0-4e41-9ee1-29bad95bb15e%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/cc5a1d38-d1f0-4e41-9ee1-29bad95bb15e=
%40isocpp.org</a>.<br />
------=_Part_385_1286024378.1457143733284--
------=_Part_384_1920701782.1457143733283--
.
Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Sat, 5 Mar 2016 08:21:03 +0100
Raw View
This is a multi-part message in MIME format.
--------------050103040404050503010000
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
Le 05/03/2016 03:08, 'Walt Karas' via ISO C++ Standard - Future=20
Proposals a =C3=A9crit :
>
>
> On Friday, March 4, 2016 at 8:22:12 PM UTC-5, Nicol Bolas wrote:
>
> On Friday, March 4, 2016 at 2:53:26 PM UTC-5, Walt Karas wrote:
>
> Personally I'm more interested in a generic endiance-swap
> function template. The books will be open in 2017, new
> features will be made, I'm selfishly thinking of the needs on
> my own turf. But why not do it in a way that is more general,
> provides for multiple needs?
>
>
> Yes... that's what /reflection/ will do. Your way is the more
> special-case and restrictive way.
>
>
> Are there other papers proposing support for reflection, besides p0255r0 =
?
> <http://www.google.com/url?q=3Dhttp%3A%2F%2Fopen-std.org%2FJTC1%2FSC22%2F=
WG21%2Fdocs%2Fpapers%2F2016%2Fp0255r0.pdf&sa=3DD&sntz=3D1&usg=3DAFQjCNFkSi3=
VdFDFaygG2yLv-eC_hWmqFg>
Yes, look at
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/.
Vicente
--=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/56DA88DF.90000%40wanadoo.fr.
--------------050103040404050503010000
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
">
</head>
<body bgcolor=3D"#FFFFFF" text=3D"#000000">
<div class=3D"moz-cite-prefix">Le 05/03/2016 03:08, 'Walt Karas' via
ISO C++ Standard - Future Proposals a =C3=A9crit=C2=A0:<br>
</div>
<blockquote
cite=3D"mid:cc5a1d38-d1f0-4e41-9ee1-29bad95bb15e@isocpp.org"
type=3D"cite">
<div dir=3D"ltr"><br>
<br>
On Friday, March 4, 2016 at 8:22:12 PM UTC-5, Nicol Bolas 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">On Friday, March 4, 2016 at 2:53:26 PM UTC-5,
Walt Karas 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">Personally I'm more interested in a generic
endiance-swap function template.=C2=A0 The books will be op=
en
in 2017, new features will be made, I'm selfishly
thinking of the needs on my own turf.=C2=A0 But why not do =
it
in a way that is more general, provides for multiple
needs?</div>
</blockquote>
<div><br>
Yes... that's what <i>reflection</i> will do. Your way is
the more special-case and restrictive way.<br>
</div>
</div>
</blockquote>
<div><br>
Are there other papers proposing support for reflection,
besides <a moz-do-not-send=3D"true"
href=3D"http://www.google.com/url?q=3Dhttp%3A%2F%2Fopen-std.org%2FJTC1%2FSC=
22%2FWG21%2Fdocs%2Fpapers%2F2016%2Fp0255r0.pdf&sa=3DD&sntz=3D1&=
usg=3DAFQjCNFkSi3VdFDFaygG2yLv-eC_hWmqFg"
target=3D"_blank" rel=3D"nofollow">p0255r0 ?<br>
</a></div>
</div>
</blockquote>
<br>
Yes, look at<br>
<br>
<a class=3D"moz-txt-link-freetext" href=3D"http://www.open-std.org/jtc1=
/sc22/wg21/docs/papers/2016/">http://www.open-std.org/jtc1/sc22/wg21/docs/p=
apers/2016/</a>.<br>
<br>
Vicente<br>
<br>
</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/56DA88DF.90000%40wanadoo.fr?utm_mediu=
m=3Demail&utm_source=3Dfooter">https://groups.google.com/a/isocpp.org/d/msg=
id/std-proposals/56DA88DF.90000%40wanadoo.fr</a>.<br />
--------------050103040404050503010000--
.
Author: "'Walt Karas' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Sat, 5 Mar 2016 16:09:10 -0800 (PST)
Raw View
------=_Part_2036_136670969.1457222951009
Content-Type: multipart/alternative;
boundary="----=_Part_2037_665169538.1457222951010"
------=_Part_2037_665169538.1457222951010
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
On Saturday, March 5, 2016 at 2:21:06 AM UTC-5, Vicente J. Botet Escriba=20
wrote:
>
> Le 05/03/2016 03:08, 'Walt Karas' via ISO C++ Standard - Future Proposals=
=20
> a =C3=A9crit :
>
>
>
> On Friday, March 4, 2016 at 8:22:12 PM UTC-5, Nicol Bolas wrote:=20
>>
>> On Friday, March 4, 2016 at 2:53:26 PM UTC-5, Walt Karas wrote:=20
>>>
>>> Personally I'm more interested in a generic endiance-swap function=20
>>> template. The books will be open in 2017, new features will be made, I=
'm=20
>>> selfishly thinking of the needs on my own turf. But why not do it in a=
way=20
>>> that is more general, provides for multiple needs?
>>>
>>
>> Yes... that's what *reflection* will do. Your way is the more=20
>> special-case and restrictive way.
>>
>
> Are there other papers proposing support for reflection, besides p0255r0 =
?
>
> <http://www.google.com/url?q=3Dhttp%3A%2F%2Fopen-std.org%2FJTC1%2FSC22%2F=
WG21%2Fdocs%2Fpapers%2F2016%2Fp0255r0.pdf&sa=3DD&sntz=3D1&usg=3DAFQjCNFkSi3=
VdFDFaygG2yLv-eC_hWmqFg>
>
>
> Yes, look at
>
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/.
>
> Vicente
>
I think it's a bad choice to not seriously consider a class=20
introspection/reflection capability that can support providing comparison=
=20
operators as library templates. Maybe these do, but it's not clear to me.
--=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/c303f05a-15d4-445f-81f8-e12f67842bcc%40isocpp.or=
g.
------=_Part_2037_665169538.1457222951010
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br>On Saturday, March 5, 2016 at 2:21:06 AM UTC-5, Vi=
cente J. Botet Escriba wrote:<blockquote class=3D"gmail_quote" style=3D"mar=
gin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">
=20
=20
=20
<div bgcolor=3D"#FFFFFF" text=3D"#000000">
<div>Le 05/03/2016 03:08, 'Walt Karas' via
ISO C++ Standard - Future Proposals a =C3=A9crit=C2=A0:<br>
</div>
<blockquote type=3D"cite">
<div dir=3D"ltr"><br>
<br>
On Friday, March 4, 2016 at 8:22:12 PM UTC-5, Nicol Bolas wrote:
<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8=
ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir=3D"ltr">On Friday, March 4, 2016 at 2:53:26 PM UTC-5,
Walt Karas 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">Personally I'm more interested in a gene=
ric
endiance-swap function template.=C2=A0 The books will be op=
en
in 2017, new features will be made, I'm selfishly
thinking of the needs on my own turf.=C2=A0 But why not do =
it
in a way that is more general, provides for multiple
needs?</div>
</blockquote>
<div><br>
Yes... that's what <i>reflection</i> will do. Your way is
the more special-case and restrictive way.<br>
</div>
</div>
</blockquote>
<div><br>
Are there other papers proposing support for reflection,
besides <a href=3D"http://www.google.com/url?q=3Dhttp%3A%2F%2Fope=
n-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F2016%2Fp0255r0.pdf&sa=
=3DD&sntz=3D1&usg=3DAFQjCNFkSi3VdFDFaygG2yLv-eC_hWmqFg" rel=3D"nofo=
llow" target=3D"_blank" onmousedown=3D"this.href=3D'http://www.google.c=
om/url?q\75http%3A%2F%2Fopen-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2=
F2016%2Fp0255r0.pdf\46sa\75D\46sntz\0751\46usg\75AFQjCNFkSi3VdFDFaygG2yLv-e=
C_hWmqFg';return true;" onclick=3D"this.href=3D'http://www.google.c=
om/url?q\75http%3A%2F%2Fopen-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2=
F2016%2Fp0255r0.pdf\46sa\75D\46sntz\0751\46usg\75AFQjCNFkSi3VdFDFaygG2yLv-e=
C_hWmqFg';return true;">p0255r0 ?<br>
</a></div>
</div>
</blockquote>
<br>
Yes, look at<br>
<br>
<a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/" ta=
rget=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D'http://www=
..google.com/url?q\75http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdo=
cs%2Fpapers%2F2016%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNFI2wXGyjIc0xNDFAAy=
AsM2FI7JPg';return true;" onclick=3D"this.href=3D'http://www.google=
..com/url?q\75http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpa=
pers%2F2016%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNFI2wXGyjIc0xNDFAAyAsM2FI7=
JPg';return true;">http://www.open-std.org/jtc1/<wbr>sc22/wg21/docs/pap=
ers/2016/</a>.<br>
<br>
Vicente<br></div></blockquote><div><br></div><div>I think it's a ba=
d choice to not seriously consider a class introspection/reflection capabil=
ity that can support providing comparison operators as library templates. =
=C2=A0Maybe these do, but it's not clear to me.</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/c303f05a-15d4-445f-81f8-e12f67842bcc%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/c303f05a-15d4-445f-81f8-e12f67842bcc=
%40isocpp.org</a>.<br />
------=_Part_2037_665169538.1457222951010--
------=_Part_2036_136670969.1457222951009--
.
Author: Nicol Bolas <jmckesson@gmail.com>
Date: Sat, 5 Mar 2016 16:27:24 -0800 (PST)
Raw View
------=_Part_459_24067788.1457224044550
Content-Type: multipart/alternative;
boundary="----=_Part_460_835142945.1457224044550"
------=_Part_460_835142945.1457224044550
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
On Saturday, March 5, 2016 at 7:09:11 PM UTC-5, Walt Karas wrote:
>
> On Saturday, March 5, 2016 at 2:21:06 AM UTC-5, Vicente J. Botet Escriba=
=20
> wrote:
>>
>> Le 05/03/2016 03:08, 'Walt Karas' via ISO C++ Standard - Future Proposal=
s=20
>> a =C3=A9crit :
>>
>>
>>
>> On Friday, March 4, 2016 at 8:22:12 PM UTC-5, Nicol Bolas wrote:=20
>>>
>>> On Friday, March 4, 2016 at 2:53:26 PM UTC-5, Walt Karas wrote:=20
>>>>
>>>> Personally I'm more interested in a generic endiance-swap function=20
>>>> template. The books will be open in 2017, new features will be made, =
I'm=20
>>>> selfishly thinking of the needs on my own turf. But why not do it in =
a way=20
>>>> that is more general, provides for multiple needs?
>>>>
>>>
>>> Yes... that's what *reflection* will do. Your way is the more=20
>>> special-case and restrictive way.
>>>
>>
>> Are there other papers proposing support for reflection, besides p0255r0=
=20
>> ?
>>
>> <http://www.google.com/url?q=3Dhttp%3A%2F%2Fopen-std.org%2FJTC1%2FSC22%2=
FWG21%2Fdocs%2Fpapers%2F2016%2Fp0255r0.pdf&sa=3DD&sntz=3D1&usg=3DAFQjCNFkSi=
3VdFDFaygG2yLv-eC_hWmqFg>
>>
>>
>> Yes, look at
>>
>> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/.
>>
>> Vicente
>>
>
> I think it's a bad choice to not seriously consider a class=20
> introspection/reflection capability that can support providing comparison=
=20
> operators as library templates. Maybe these do, but it's not clear to me=
..
>
.... why bother? With default operators=20
<http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2016/p0221r0.html>,=20
generating comparison operators won't be a significant use case for=20
reflection. Now, that doesn't mean you won't want to do it sometimes. But=
=20
most of the time, no.
Also, just because one reflection proposal doesn't have something doesn't=
=20
mean that others won't. Compile-time reflection is hard to get right.
--=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/7e46c46d-2e18-4cec-92c1-4f4d7fbc786b%40isocpp.or=
g.
------=_Part_460_835142945.1457224044550
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On Saturday, March 5, 2016 at 7:09:11 PM UTC-5, Walt Karas=
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">On Sat=
urday, March 5, 2016 at 2:21:06 AM UTC-5, Vicente J. Botet Escriba wrote:<b=
lockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-=
left:1px #ccc solid;padding-left:1ex">
=20
=20
=20
<div bgcolor=3D"#FFFFFF" text=3D"#000000">
<div>Le 05/03/2016 03:08, 'Walt Karas' via
ISO C++ Standard - Future Proposals a =C3=A9crit=C2=A0:<br>
</div>
<blockquote type=3D"cite">
<div dir=3D"ltr"><br>
<br>
On Friday, March 4, 2016 at 8:22:12 PM UTC-5, Nicol Bolas wrote:
<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8=
ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir=3D"ltr">On Friday, March 4, 2016 at 2:53:26 PM UTC-5,
Walt Karas 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">Personally I'm more interested in a gene=
ric
endiance-swap function template.=C2=A0 The books will be op=
en
in 2017, new features will be made, I'm selfishly
thinking of the needs on my own turf.=C2=A0 But why not do =
it
in a way that is more general, provides for multiple
needs?</div>
</blockquote>
<div><br>
Yes... that's what <i>reflection</i> will do. Your way is
the more special-case and restrictive way.<br>
</div>
</div>
</blockquote>
<div><br>
Are there other papers proposing support for reflection,
besides <a href=3D"http://www.google.com/url?q=3Dhttp%3A%2F%2Fope=
n-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F2016%2Fp0255r0.pdf&sa=
=3DD&sntz=3D1&usg=3DAFQjCNFkSi3VdFDFaygG2yLv-eC_hWmqFg" rel=3D"nofo=
llow" target=3D"_blank" onmousedown=3D"this.href=3D'http://www.google.c=
om/url?q\75http%3A%2F%2Fopen-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2=
F2016%2Fp0255r0.pdf\46sa\75D\46sntz\0751\46usg\75AFQjCNFkSi3VdFDFaygG2yLv-e=
C_hWmqFg';return true;" onclick=3D"this.href=3D'http://www.google.c=
om/url?q\75http%3A%2F%2Fopen-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2=
F2016%2Fp0255r0.pdf\46sa\75D\46sntz\0751\46usg\75AFQjCNFkSi3VdFDFaygG2yLv-e=
C_hWmqFg';return true;">p0255r0 ?<br>
</a></div>
</div>
</blockquote>
<br>
Yes, look at<br>
<br>
<a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/" re=
l=3D"nofollow" target=3D"_blank" onmousedown=3D"this.href=3D'http://www=
..google.com/url?q\75http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdo=
cs%2Fpapers%2F2016%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNFI2wXGyjIc0xNDFAAy=
AsM2FI7JPg';return true;" onclick=3D"this.href=3D'http://www.google=
..com/url?q\75http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpa=
pers%2F2016%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNFI2wXGyjIc0xNDFAAyAsM2FI7=
JPg';return true;">http://www.open-std.org/jtc1/<wbr>sc22/wg21/docs/pap=
ers/2016/</a>.<br>
<br>
Vicente<br></div></blockquote><div><br></div><div>I think it's a ba=
d choice to not seriously consider a class introspection/reflection capabil=
ity that can support providing comparison operators as library templates. =
=C2=A0Maybe these do, but it's not clear to me.</div></div></blockquote=
><div><br>... why bother? With <a href=3D"http://www.open-std.org/JTC1/SC22=
/WG21/docs/papers/2016/p0221r0.html">default operators</a>, generating comp=
arison operators won't be a significant use case for reflection. Now, t=
hat doesn't mean you won't want to do it sometimes. But most of the=
time, no.<br><br>Also, just because one reflection proposal doesn't ha=
ve something doesn't mean that others won't. Compile-time reflectio=
n is hard to get right.<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/7e46c46d-2e18-4cec-92c1-4f4d7fbc786b%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/7e46c46d-2e18-4cec-92c1-4f4d7fbc786b=
%40isocpp.org</a>.<br />
------=_Part_460_835142945.1457224044550--
------=_Part_459_24067788.1457224044550--
.
Author: "'Walt Karas' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Sat, 5 Mar 2016 17:17:36 -0800 (PST)
Raw View
------=_Part_2249_1793260402.1457227056713
Content-Type: multipart/alternative;
boundary="----=_Part_2250_1305679271.1457227056713"
------=_Part_2250_1305679271.1457227056713
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
On Saturday, March 5, 2016 at 7:27:24 PM UTC-5, Nicol Bolas wrote:
>
> On Saturday, March 5, 2016 at 7:09:11 PM UTC-5, Walt Karas wrote:
>>
>> On Saturday, March 5, 2016 at 2:21:06 AM UTC-5, Vicente J. Botet Escriba=
=20
>> wrote:
>>>
>>> Le 05/03/2016 03:08, 'Walt Karas' via ISO C++ Standard - Future=20
>>> Proposals a =C3=A9crit :
>>>
>>>
>>>
>>> On Friday, March 4, 2016 at 8:22:12 PM UTC-5, Nicol Bolas wrote:=20
>>>>
>>>> On Friday, March 4, 2016 at 2:53:26 PM UTC-5, Walt Karas wrote:=20
>>>>>
>>>>> Personally I'm more interested in a generic endiance-swap function=20
>>>>> template. The books will be open in 2017, new features will be made,=
I'm=20
>>>>> selfishly thinking of the needs on my own turf. But why not do it in=
a way=20
>>>>> that is more general, provides for multiple needs?
>>>>>
>>>>
>>>> Yes... that's what *reflection* will do. Your way is the more=20
>>>> special-case and restrictive way.
>>>>
>>>
>>> Are there other papers proposing support for reflection, besides p0255r=
0=20
>>> ?
>>>
>>> <http://www.google.com/url?q=3Dhttp%3A%2F%2Fopen-std.org%2FJTC1%2FSC22%=
2FWG21%2Fdocs%2Fpapers%2F2016%2Fp0255r0.pdf&sa=3DD&sntz=3D1&usg=3DAFQjCNFkS=
i3VdFDFaygG2yLv-eC_hWmqFg>
>>>
>>>
>>> Yes, look at
>>>
>>> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/.
>>>
>>> Vicente
>>>
>>
>> I think it's a bad choice to not seriously consider a class=20
>> introspection/reflection capability that can support providing compariso=
n=20
>> operators as library templates. Maybe these do, but it's not clear to m=
e.
>>
>
> ... why bother? With default operators=20
> <http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2016/p0221r0.html>,=
=20
> generating comparison operators won't be a significant use case for=20
> reflection. Now, that doesn't mean you won't want to do it sometimes. But=
=20
> most of the time, no.
>
> Also, just because one reflection proposal doesn't have something doesn't=
=20
> mean that others won't. Compile-time reflection is hard to get right.
>
Experience has shown that good layered architectures are generally=20
advantageous. A rule of thumb for a good layered architecture is to have=
=20
one capability in a lower layer that supports multiple capabilities in a=20
higher layer. As opposed to supporting just one or some or all of those=20
multiple capabilities in the lower layer. The base language is the lowest=
=20
layer of the C++ architecture. Therefore, I think it's likely to be better=
=20
to have a capability in the base language that allows for support of=20
reasonably good generic comparison operators, generic stream input/output=
=20
operators, generic std::hash, maybe generic JSON/XML input/output, etc=20
using library code above the base layer.
--=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/d6495758-627e-434d-a867-ed473d869f47%40isocpp.or=
g.
------=_Part_2250_1305679271.1457227056713
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On Saturday, March 5, 2016 at 7:27:24 PM UTC-5, Nicol Bola=
s 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">On Sa=
turday, March 5, 2016 at 7:09:11 PM UTC-5, Walt Karas wrote:<blockquote cla=
ss=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc=
solid;padding-left:1ex"><div dir=3D"ltr">On Saturday, March 5, 2016 at 2:2=
1:06 AM UTC-5, Vicente J. Botet Escriba wrote:<blockquote class=3D"gmail_qu=
ote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding=
-left:1ex">
=20
=20
=20
<div bgcolor=3D"#FFFFFF" text=3D"#000000">
<div>Le 05/03/2016 03:08, 'Walt Karas' via
ISO C++ Standard - Future Proposals a =C3=A9crit=C2=A0:<br>
</div>
<blockquote type=3D"cite">
<div dir=3D"ltr"><br>
<br>
On Friday, March 4, 2016 at 8:22:12 PM UTC-5, Nicol Bolas wrote:
<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8=
ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir=3D"ltr">On Friday, March 4, 2016 at 2:53:26 PM UTC-5,
Walt Karas 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">Personally I'm more interested in a gene=
ric
endiance-swap function template.=C2=A0 The books will be op=
en
in 2017, new features will be made, I'm selfishly
thinking of the needs on my own turf.=C2=A0 But why not do =
it
in a way that is more general, provides for multiple
needs?</div>
</blockquote>
<div><br>
Yes... that's what <i>reflection</i> will do. Your way is
the more special-case and restrictive way.<br>
</div>
</div>
</blockquote>
<div><br>
Are there other papers proposing support for reflection,
besides <a href=3D"http://www.google.com/url?q=3Dhttp%3A%2F%2Fope=
n-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F2016%2Fp0255r0.pdf&sa=
=3DD&sntz=3D1&usg=3DAFQjCNFkSi3VdFDFaygG2yLv-eC_hWmqFg" rel=3D"nofo=
llow" target=3D"_blank" onmousedown=3D"this.href=3D'http://www.google.c=
om/url?q\75http%3A%2F%2Fopen-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2=
F2016%2Fp0255r0.pdf\46sa\75D\46sntz\0751\46usg\75AFQjCNFkSi3VdFDFaygG2yLv-e=
C_hWmqFg';return true;" onclick=3D"this.href=3D'http://www.google.c=
om/url?q\75http%3A%2F%2Fopen-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2=
F2016%2Fp0255r0.pdf\46sa\75D\46sntz\0751\46usg\75AFQjCNFkSi3VdFDFaygG2yLv-e=
C_hWmqFg';return true;">p0255r0 ?<br>
</a></div>
</div>
</blockquote>
<br>
Yes, look at<br>
<br>
<a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/" re=
l=3D"nofollow" target=3D"_blank" onmousedown=3D"this.href=3D'http://www=
..google.com/url?q\75http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdo=
cs%2Fpapers%2F2016%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNFI2wXGyjIc0xNDFAAy=
AsM2FI7JPg';return true;" onclick=3D"this.href=3D'http://www.google=
..com/url?q\75http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpa=
pers%2F2016%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNFI2wXGyjIc0xNDFAAyAsM2FI7=
JPg';return true;">http://www.open-std.org/jtc1/<wbr>sc22/wg21/docs/pap=
ers/2016/</a>.<br>
<br>
Vicente<br></div></blockquote><div><br></div><div>I think it's a ba=
d choice to not seriously consider a class introspection/reflection capabil=
ity that can support providing comparison operators as library templates. =
=C2=A0Maybe these do, but it's not clear to me.</div></div></blockquote=
><div><br>... why bother? With <a href=3D"http://www.open-std.org/JTC1/SC22=
/WG21/docs/papers/2016/p0221r0.html" target=3D"_blank" rel=3D"nofollow" onm=
ousedown=3D"this.href=3D'http://www.google.com/url?q\75http%3A%2F%2Fwww=
..open-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F2016%2Fp0221r0.html\46=
sa\75D\46sntz\0751\46usg\75AFQjCNFScYNzmrfSt01ZYIZWQz1JDLbTkA';return t=
rue;" onclick=3D"this.href=3D'http://www.google.com/url?q\75http%3A%2F%=
2Fwww.open-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F2016%2Fp0221r0.ht=
ml\46sa\75D\46sntz\0751\46usg\75AFQjCNFScYNzmrfSt01ZYIZWQz1JDLbTkA';ret=
urn true;">default operators</a>, generating comparison operators won't=
be a significant use case for reflection. Now, that doesn't mean you w=
on't want to do it sometimes. But most of the time, no.<br><br>Also, ju=
st because one reflection proposal doesn't have something doesn't m=
ean that others won't. Compile-time reflection is hard to get right.<br=
></div></div></blockquote><div><br></div><div>Experience has shown that goo=
d layered architectures are generally advantageous. =C2=A0A rule of thumb f=
or a good layered architecture is to have one capability in a lower layer t=
hat supports multiple capabilities in a higher layer. =C2=A0As opposed to s=
upporting just one or some or all of those multiple capabilities in the low=
er layer. =C2=A0The base language is the lowest layer of the C++ architectu=
re. =C2=A0Therefore, I think it's likely to be better to have a capabil=
ity in the base language that allows for support of reasonably good generic=
comparison operators, generic stream input/output operators, generic std::=
hash, maybe generic JSON/XML input/output, etc using library code above the=
base layer.</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/d6495758-627e-434d-a867-ed473d869f47%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/d6495758-627e-434d-a867-ed473d869f47=
%40isocpp.org</a>.<br />
------=_Part_2250_1305679271.1457227056713--
------=_Part_2249_1793260402.1457227056713--
.
Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Sun, 6 Mar 2016 17:21:16 +0100
Raw View
This is a multi-part message in MIME format.
--------------070604040300020203050503
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
Le 06/03/2016 02:17, 'Walt Karas' via ISO C++ Standard - Future=20
Proposals a =C3=A9crit :
> On Saturday, March 5, 2016 at 7:27:24 PM UTC-5, Nicol Bolas wrote:
>
> On Saturday, March 5, 2016 at 7:09:11 PM UTC-5, Walt Karas wrote:
>
> On Saturday, March 5, 2016 at 2:21:06 AM UTC-5, Vicente J.
> Botet Escriba wrote:
>
> Le 05/03/2016 03:08, 'Walt Karas' via ISO C++ Standard -
> Future Proposals a =C3=A9crit :
>>
>>
>> On Friday, March 4, 2016 at 8:22:12 PM UTC-5, Nicol Bolas
>> wrote:
>>
>> On Friday, March 4, 2016 at 2:53:26 PM UTC-5, Walt
>> Karas wrote:
>>
>> Personally I'm more interested in a generic
>> endiance-swap function template. The books will
>> be open in 2017, new features will be made, I'm
>> selfishly thinking of the needs on my own turf.=20
>> But why not do it in a way that is more general,
>> provides for multiple needs?
>>
>>
>> Yes... that's what /reflection/ will do. Your way is
>> the more special-case and restrictive way.
>>
>>
>> Are there other papers proposing support for reflection,
>> besides p0255r0 ?
>> <http://www.google.com/url?q=3Dhttp%3A%2F%2Fopen-std.org%2FJ=
TC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F2016%2Fp0255r0.pdf&sa=3DD&sntz=3D1&usg=
=3DAFQjCNFkSi3VdFDFaygG2yLv-eC_hWmqFg>
>
> Yes, look at
>
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/
> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/>.
>
> Vicente
>
>
> I think it's a bad choice to not seriously consider a class
> introspection/reflection capability that can support providing
> comparison operators as library templates. Maybe these do,
> but it's not clear to me.
>
It depends if yous data is private or not. It is not clear yet what we=20
could be able to do reflecting private data.
>
>
> ... why bother? With default operators
> <http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2016/p0221r0.html=
>,
> generating comparison operators won't be a significant use case
> for reflection. Now, that doesn't mean you won't want to do it
> sometimes. But most of the time, no.
>
> Also, just because one reflection proposal doesn't have something
> doesn't mean that others won't. Compile-time reflection is hard to
> get right.
>
>
> Experience has shown that good layered architectures are generally=20
> advantageous. A rule of thumb for a good layered architecture is to=20
> have one capability in a lower layer that supports multiple=20
> capabilities in a higher layer. As opposed to supporting just one or=20
> some or all of those multiple capabilities in the lower layer. The=20
> base language is the lowest layer of the C++ architecture. Therefore,=20
> I think it's likely to be better to have a capability in the base=20
> language that allows for support of reasonably good generic comparison=20
> operators, generic stream input/output operators, generic std::hash,=20
> maybe generic JSON/XML input/output, etc using library code above the=20
> base layer.
>
I believe that we agree all here. We just need a proposal that has=20
enough consensus :)
Vicente
--=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/56DC58FC.9020009%40wanadoo.fr.
--------------070604040300020203050503
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
">
</head>
<body bgcolor=3D"#FFFFFF" text=3D"#000000">
<div class=3D"moz-cite-prefix">Le 06/03/2016 02:17, 'Walt Karas' via
ISO C++ Standard - Future Proposals a =C3=A9crit=C2=A0:<br>
</div>
<blockquote
cite=3D"mid:d6495758-627e-434d-a867-ed473d869f47@isocpp.org"
type=3D"cite">
<div dir=3D"ltr">On Saturday, March 5, 2016 at 7:27:24 PM UTC-5,
Nicol Bolas 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">On Saturday, March 5, 2016 at 7:09:11 PM UTC-5,
Walt Karas 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">On Saturday, March 5, 2016 at 2:21:06 AM
UTC-5, Vicente J. Botet Escriba wrote:
<blockquote class=3D"gmail_quote"
style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div bgcolor=3D"#FFFFFF" text=3D"#000000">
<div>Le 05/03/2016 03:08, 'Walt Karas' via ISO C++
Standard - Future Proposals a =C3=A9crit=C2=A0:<br>
</div>
<blockquote type=3D"cite">
<div dir=3D"ltr"><br>
<br>
On Friday, March 4, 2016 at 8:22:12 PM UTC-5,
Nicol Bolas wrote:
<blockquote class=3D"gmail_quote"
style=3D"margin:0;margin-left:0.8ex;border-left:1=
px
#ccc solid;padding-left:1ex">
<div dir=3D"ltr">On Friday, March 4, 2016 at
2:53:26 PM UTC-5, Walt Karas wrote:
<blockquote class=3D"gmail_quote"
style=3D"margin:0;margin-left:0.8ex;border-le=
ft:1px
#ccc solid;padding-left:1ex">
<div dir=3D"ltr">Personally I'm more
interested in a generic endiance-swap
function template.=C2=A0 The books will be
open in 2017, new features will be made,
I'm selfishly thinking of the needs on
my own turf.=C2=A0 But why not do it in a w=
ay
that is more general, provides for
multiple needs?</div>
</blockquote>
<div><br>
Yes... that's what <i>reflection</i> will
do. Your way is the more special-case and
restrictive way.<br>
</div>
</div>
</blockquote>
<div><br>
Are there other papers proposing support for
reflection, besides <a moz-do-not-send=3D"true"
href=3D"http://www.google.com/url?q=3Dhttp%3A%2F%2Fopen-std.org%2FJTC1%2FSC=
22%2FWG21%2Fdocs%2Fpapers%2F2016%2Fp0255r0.pdf&sa=3DD&sntz=3D1&=
usg=3DAFQjCNFkSi3VdFDFaygG2yLv-eC_hWmqFg"
rel=3D"nofollow" target=3D"_blank"
onmousedown=3D"this.href=3D'http://www.google.c=
om/url?q\75http%3A%2F%2Fopen-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2=
F2016%2Fp0255r0.pdf\46sa\75D\46sntz\0751\46usg\75AFQjCNFkSi3VdFDFaygG2yLv-e=
C_hWmqFg';return
true;"
onclick=3D"this.href=3D'http://www.google.com/u=
rl?q\75http%3A%2F%2Fopen-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F201=
6%2Fp0255r0.pdf\46sa\75D\46sntz\0751\46usg\75AFQjCNFkSi3VdFDFaygG2yLv-eC_hW=
mqFg';return
true;">p0255r0 ?<br>
</a></div>
</div>
</blockquote>
<br>
Yes, look at<br>
<br>
<a moz-do-not-send=3D"true"
href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/p=
apers/2016/"
rel=3D"nofollow" target=3D"_blank"
onmousedown=3D"this.href=3D'http://www.google.com/url=
?q\75http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2=
016%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNFI2wXGyjIc0xNDFAAyAsM2FI7JPg';ret=
urn
true;"
onclick=3D"this.href=3D'http://www.google.com/url?q\7=
5http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2016%=
2F\46sa\75D\46sntz\0751\46usg\75AFQjCNFI2wXGyjIc0xNDFAAyAsM2FI7JPg';return
true;">http://www.open-std.org/jtc1/<wbr>sc22/wg21/do=
cs/papers/2016/</a>.<br>
<br>
Vicente<br>
</div>
</blockquote>
<div><br>
</div>
<div>I think it's a bad choice to not seriously consider
a class introspection/reflection capability that can
support providing comparison operators as library
templates. =C2=A0Maybe these do, but it's not clear to me=
..</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
It depends if yous data is private or not. It is not clear yet what
we could be able to do reflecting private data.<br>
<blockquote
cite=3D"mid:d6495758-627e-434d-a867-ed473d869f47@isocpp.org"
type=3D"cite">
<div dir=3D"ltr">
<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><br>
... why bother? With <a moz-do-not-send=3D"true"
href=3D"http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2016/p0221r0.htm=
l"
target=3D"_blank" rel=3D"nofollow"
onmousedown=3D"this.href=3D'http://www.google.com/url?q\75h=
ttp%3A%2F%2Fwww.open-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F2016%2F=
p0221r0.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFScYNzmrfSt01ZYIZWQz1JDLbTk=
A';return
true;"
onclick=3D"this.href=3D'http://www.google.com/url?q\75http%=
3A%2F%2Fwww.open-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F2016%2Fp022=
1r0.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFScYNzmrfSt01ZYIZWQz1JDLbTkA';r=
eturn
true;">default operators</a>, generating comparison
operators won't be a significant use case for reflection.
Now, that doesn't mean you won't want to do it sometimes.
But most of the time, no.<br>
<br>
Also, just because one reflection proposal doesn't have
something doesn't mean that others won't. Compile-time
reflection is hard to get right.<br>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Experience has shown that good layered architectures are
generally advantageous. =C2=A0A rule of thumb for a good layered
architecture is to have one capability in a lower layer that
supports multiple capabilities in a higher layer. =C2=A0As oppose=
d
to supporting just one or some or all of those multiple
capabilities in the lower layer. =C2=A0The base language is the
lowest layer of the C++ architecture. =C2=A0Therefore, I think it=
's
likely to be better to have a capability in the base language
that allows for support of reasonably good generic comparison
operators, generic stream input/output operators, generic
std::hash, maybe generic JSON/XML input/output, etc using
library code above the base layer.</div>
</div>
<br>
</blockquote>
I believe that we agree all here. We just need a proposal that has
enough consensus :)<br>
<br>
Vicente<br>
</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/56DC58FC.9020009%40wanadoo.fr?utm_med=
ium=3Demail&utm_source=3Dfooter">https://groups.google.com/a/isocpp.org/d/m=
sgid/std-proposals/56DC58FC.9020009%40wanadoo.fr</a>.<br />
--------------070604040300020203050503--
.
Author: Cleiton Santoia <cleitonsantoia@gmail.com>
Date: Sun, 6 Mar 2016 11:40:30 -0800 (PST)
Raw View
------=_Part_427_284616195.1457293230280
Content-Type: multipart/alternative;
boundary="----=_Part_428_1650727285.1457293230280"
------=_Part_428_1650727285.1457293230280
Content-Type: text/plain; charset=UTF-8
>
>
> Experience has shown that good layered architectures are generally
> advantageous. A rule of thumb for a good layered architecture is to have
> one capability in a lower layer that supports multiple capabilities in a
> higher layer. As opposed to supporting just one or some or all of those
> multiple capabilities in the lower layer. The base language is the lowest
> layer of the C++ architecture. Therefore, I think it's likely to be better
> to have a capability in the base language that allows for support of
> reasonably good generic comparison operators, generic stream input/output
> operators, generic std::hash, maybe generic JSON/XML input/output, etc
> using library code above the base layer.
>
In the both reflection proposals there are a sample of JSON serialization
(in sligtly different ways), but both static and without "mapping"
functions.
You dont need that "Component" structure you proposed, you just expand the
pack thru folding.
Here the code <http://coliru.stacked-crooked.com/view?id=b907dd58003a2748> your
10 liner 'operator ==' lib-olny on top of reflection ( from line 8 to 18 ).
Please pay attention on lines 10 and 16, in 10 we have a "template folding"
and in 16 we have the only line that will change after reflection be
accepted (hopefully).
--
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/39bbeb02-62b8-497b-8d65-5780a6baca97%40isocpp.org.
------=_Part_428_1650727285.1457293230280
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"l=
tr"><div><br></div><div>Experience has shown that good layered architecture=
s are generally advantageous. =C2=A0A rule of thumb for a good layered arch=
itecture is to have one capability in a lower layer that supports multiple =
capabilities in a higher layer. =C2=A0As opposed to supporting just one or =
some or all of those multiple capabilities in the lower layer. =C2=A0The ba=
se language is the lowest layer of the C++ architecture. =C2=A0Therefore, I=
think it's likely to be better to have a capability in the base langua=
ge that allows for support of reasonably good generic comparison operators,=
generic stream input/output operators, generic std::hash, maybe generic JS=
ON/XML input/output, etc using library code above the base layer.</div></di=
v></blockquote><div><br></div><div>In the both reflection proposals there a=
re a sample of JSON serialization (in sligtly different ways), but both sta=
tic and without "mapping" functions.<br></div><div>You dont need =
that "Component" structure you proposed, you just expand the pack=
thru folding.=C2=A0<br></div><div><br></div><div>Here <a href=3D"http://co=
liru.stacked-crooked.com/view?id=3Db907dd58003a2748">the code</a>=C2=A0your=
10 liner 'operator =3D=3D' lib-olny on top of reflection ( from li=
ne 8 to 18 ).=C2=A0<br></div><div><br></div><div>Please pay attention on li=
nes 10 and 16, in 10 we have a "template folding" and in 16 we ha=
ve the only line that will change after reflection be accepted=C2=A0(hopefu=
lly).</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/39bbeb02-62b8-497b-8d65-5780a6baca97%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/39bbeb02-62b8-497b-8d65-5780a6baca97=
%40isocpp.org</a>.<br />
------=_Part_428_1650727285.1457293230280--
------=_Part_427_284616195.1457293230280--
.
Author: "'Walt Karas' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Sun, 6 Mar 2016 15:04:35 -0800 (PST)
Raw View
------=_Part_419_1725283238.1457305475456
Content-Type: multipart/alternative;
boundary="----=_Part_420_1848733167.1457305475457"
------=_Part_420_1848733167.1457305475457
Content-Type: text/plain; charset=UTF-8
On Sunday, March 6, 2016 at 2:40:30 PM UTC-5, Cleiton Santoia wrote:
>
>
>> Experience has shown that good layered architectures are generally
>> advantageous. A rule of thumb for a good layered architecture is to have
>> one capability in a lower layer that supports multiple capabilities in a
>> higher layer. As opposed to supporting just one or some or all of those
>> multiple capabilities in the lower layer. The base language is the lowest
>> layer of the C++ architecture. Therefore, I think it's likely to be better
>> to have a capability in the base language that allows for support of
>> reasonably good generic comparison operators, generic stream input/output
>> operators, generic std::hash, maybe generic JSON/XML input/output, etc
>> using library code above the base layer.
>>
>
> In the both reflection proposals there are a sample of JSON serialization
> (in sligtly different ways), but both static and without "mapping"
> functions.
> You dont need that "Component" structure you proposed, you just expand the
> pack thru folding.
>
> Here the code <http://coliru.stacked-crooked.com/view?id=b907dd58003a2748> your
> 10 liner 'operator ==' lib-olny on top of reflection ( from line 8 to 18 ).
>
> Please pay attention on lines 10 and 16, in 10 we have a "template
> folding" and in 16 we have the only line that will change after reflection
> be accepted (hopefully).
>
>
Can you show an example that would work also if the class had private data
members and base classes?
--
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/05ac78e7-3d30-4a99-ad0f-a3d29497e2ff%40isocpp.org.
------=_Part_420_1848733167.1457305475457
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On Sunday, March 6, 2016 at 2:40:30 PM UTC-5, Cleiton Sant=
oia 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"><bl=
ockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-l=
eft:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><br></div><div>E=
xperience has shown that good layered architectures are generally advantage=
ous. =C2=A0A rule of thumb for a good layered architecture is to have one c=
apability in a lower layer that supports multiple capabilities in a higher =
layer. =C2=A0As opposed to supporting just one or some or all of those mult=
iple capabilities in the lower layer. =C2=A0The base language is the lowest=
layer of the C++ architecture. =C2=A0Therefore, I think it's likely to=
be better to have a capability in the base language that allows for suppor=
t of reasonably good generic comparison operators, generic stream input/out=
put operators, generic std::hash, maybe generic JSON/XML input/output, etc =
using library code above the base layer.</div></div></blockquote><div><br><=
/div><div>In the both reflection proposals there are a sample of JSON seria=
lization (in sligtly different ways), but both static and without "map=
ping" functions.<br></div><div>You dont need that "Component"=
; structure you proposed, you just expand the pack thru folding.=C2=A0<br><=
/div><div><br></div><div>Here <a href=3D"http://coliru.stacked-crooked.com/=
view?id=3Db907dd58003a2748" target=3D"_blank" rel=3D"nofollow" onmousedown=
=3D"this.href=3D'http://www.google.com/url?q\75http%3A%2F%2Fcoliru.stac=
ked-crooked.com%2Fview%3Fid%3Db907dd58003a2748\46sa\75D\46sntz\0751\46usg\7=
5AFQjCNHkLoGXQXLUjEgf9-GztbSysVY81g';return true;" onclick=3D"this.href=
=3D'http://www.google.com/url?q\75http%3A%2F%2Fcoliru.stacked-crooked.c=
om%2Fview%3Fid%3Db907dd58003a2748\46sa\75D\46sntz\0751\46usg\75AFQjCNHkLoGX=
QXLUjEgf9-GztbSysVY81g';return true;">the code</a>=C2=A0your 10 liner &=
#39;operator =3D=3D' lib-olny on top of reflection ( from line 8 to 18 =
).=C2=A0<br></div><div><br></div><div>Please pay attention on lines 10 and =
16, in 10 we have a "template folding" and in 16 we have the only=
line that will change after reflection be accepted=C2=A0(hopefully).</div>=
<div><br></div></div></blockquote><div><br></div><div>Can you show an examp=
le that would work also if the class had private data members and base clas=
ses?=C2=A0</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/05ac78e7-3d30-4a99-ad0f-a3d29497e2ff%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/05ac78e7-3d30-4a99-ad0f-a3d29497e2ff=
%40isocpp.org</a>.<br />
------=_Part_420_1848733167.1457305475457--
------=_Part_419_1725283238.1457305475456--
.
Author: "'Walt Karas' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Sun, 6 Mar 2016 15:26:22 -0800 (PST)
Raw View
------=_Part_2580_521731145.1457306782711
Content-Type: multipart/alternative;
boundary="----=_Part_2581_537660415.1457306782711"
------=_Part_2581_537660415.1457306782711
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
On Sunday, March 6, 2016 at 11:21:19 AM UTC-5, Vicente J. Botet Escriba=20
wrote:
>
> Le 06/03/2016 02:17, 'Walt Karas' via ISO C++ Standard - Future Proposals=
=20
> a =C3=A9crit :
>
> On Saturday, March 5, 2016 at 7:27:24 PM UTC-5, Nicol Bolas wrote:=20
>>
>> On Saturday, March 5, 2016 at 7:09:11 PM UTC-5, Walt Karas wrote:=20
>>>
>>> On Saturday, March 5, 2016 at 2:21:06 AM UTC-5, Vicente J. Botet Escrib=
a=20
>>> wrote:=20
>>>>
>>>> Le 05/03/2016 03:08, 'Walt Karas' via ISO C++ Standard - Future=20
>>>> Proposals a =C3=A9crit :
>>>>
>>>>
>>>>
>>>> On Friday, March 4, 2016 at 8:22:12 PM UTC-5, Nicol Bolas wrote:=20
>>>>>
>>>>> On Friday, March 4, 2016 at 2:53:26 PM UTC-5, Walt Karas wrote:=20
>>>>>>
>>>>>> Personally I'm more interested in a generic endiance-swap function=
=20
>>>>>> template. The books will be open in 2017, new features will be made=
, I'm=20
>>>>>> selfishly thinking of the needs on my own turf. But why not do it i=
n a way=20
>>>>>> that is more general, provides for multiple needs?
>>>>>>
>>>>>
>>>>> Yes... that's what *reflection* will do. Your way is the more=20
>>>>> special-case and restrictive way.
>>>>>
>>>>
>>>> Are there other papers proposing support for reflection, besides p0255=
r0=20
>>>> ?
>>>>
>>>> <http://www.google.com/url?q=3Dhttp%3A%2F%2Fopen-std.org%2FJTC1%2FSC22=
%2FWG21%2Fdocs%2Fpapers%2F2016%2Fp0255r0.pdf&sa=3DD&sntz=3D1&usg=3DAFQjCNFk=
Si3VdFDFaygG2yLv-eC_hWmqFg>
>>>>
>>>>
>>>> Yes, look at
>>>>
>>>> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/.
>>>>
>>>> Vicente
>>>>
>>>
>>> I think it's a bad choice to not seriously consider a class=20
>>> introspection/reflection capability that can support providing comparis=
on=20
>>> operators as library templates. Maybe these do, but it's not clear to =
me.
>>>
>> It depends if yous data is private or not. It is not clear yet what we=
=20
> could be able to do reflecting private data.
>
I suggested one possibility, for "Components" to be a default public class=
=20
member. "Components" could also be a default protected class member. So=
=20
the class would have to friend a helper class of comparison or other=20
operator templates in order for the default operator to work for the class.=
=20
Maybe use of the ++T idiom or Ceiton's keyword-based idioms could be the=
=20
equivalent of protected if they accessed private components.
A big issue would be, should users of something as basic as comparison=20
operators have to deal with template use error hell-spew? But even the=20
most casual users of C++ should still be using the STL, shouldn't they?=20
I'm not sure it's reasonable to shelter even them from template hell-spew.
--=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/8922074a-fe00-4476-a8ef-8ba5840e1338%40isocpp.or=
g.
------=_Part_2581_537660415.1457306782711
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On Sunday, March 6, 2016 at 11:21:19 AM UTC-5, Vicente J. =
Botet Escriba wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;ma=
rgin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">
=20
=20
=20
<div bgcolor=3D"#FFFFFF" text=3D"#000000">
<div>Le 06/03/2016 02:17, 'Walt Karas' via
ISO C++ Standard - Future Proposals a =C3=A9crit=C2=A0:<br>
</div>
<blockquote type=3D"cite">
<div dir=3D"ltr">On Saturday, March 5, 2016 at 7:27:24 PM UTC-5,
Nicol Bolas wrote:
<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8=
ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir=3D"ltr">On Saturday, March 5, 2016 at 7:09:11 PM UTC-5,
Walt Karas 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">On Saturday, March 5, 2016 at 2:21:06 AM
UTC-5, Vicente J. Botet Escriba wrote:
<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-=
left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor=3D"#FFFFFF" text=3D"#000000">
<div>Le 05/03/2016 03:08, 'Walt Karas' via ISO =
C++
Standard - Future Proposals a =C3=A9crit=C2=A0:<br>
</div>
<blockquote type=3D"cite">
<div dir=3D"ltr"><br>
<br>
On Friday, March 4, 2016 at 8:22:12 PM UTC-5,
Nicol Bolas 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">On Friday, March 4, 2016 at
2:53:26 PM UTC-5, Walt Karas wrote:
<blockquote class=3D"gmail_quote" style=3D"marg=
in:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir=3D"ltr">Personally I'm more
interested in a generic endiance-swap
function template.=C2=A0 The books will be
open in 2017, new features will be made,
I'm selfishly thinking of the needs on
my own turf.=C2=A0 But why not do it in a w=
ay
that is more general, provides for
multiple needs?</div>
</blockquote>
<div><br>
Yes... that's what <i>reflection</i> will
do. Your way is the more special-case and
restrictive way.<br>
</div>
</div>
</blockquote>
<div><br>
Are there other papers proposing support for
reflection, besides <a href=3D"http://www.google.=
com/url?q=3Dhttp%3A%2F%2Fopen-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%=
2F2016%2Fp0255r0.pdf&sa=3DD&sntz=3D1&usg=3DAFQjCNFkSi3VdFDFaygG=
2yLv-eC_hWmqFg" rel=3D"nofollow" target=3D"_blank" onmousedown=3D"this.href=
=3D'http://www.google.com/url?q\75http%3A%2F%2Fopen-std.org%2FJTC1%2FSC=
22%2FWG21%2Fdocs%2Fpapers%2F2016%2Fp0255r0.pdf\46sa\75D\46sntz\0751\46usg\7=
5AFQjCNFkSi3VdFDFaygG2yLv-eC_hWmqFg';return true;" onclick=3D"this.href=
=3D'http://www.google.com/url?q\75http%3A%2F%2Fopen-std.org%2FJTC1%2FSC=
22%2FWG21%2Fdocs%2Fpapers%2F2016%2Fp0255r0.pdf\46sa\75D\46sntz\0751\46usg\7=
5AFQjCNFkSi3VdFDFaygG2yLv-eC_hWmqFg';return true;">p0255r0 ?<br>
</a></div>
</div>
</blockquote>
<br>
Yes, look at<br>
<br>
<a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/=
papers/2016/" rel=3D"nofollow" target=3D"_blank" onmousedown=3D"this.href=
=3D'http://www.google.com/url?q\75http%3A%2F%2Fwww.open-std.org%2Fjtc1%=
2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2016%2F\46sa\75D\46sntz\0751\46usg\75AFQjCN=
FI2wXGyjIc0xNDFAAyAsM2FI7JPg';return true;" onclick=3D"this.href=3D'=
;http://www.google.com/url?q\75http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%=
2Fwg21%2Fdocs%2Fpapers%2F2016%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNFI2wXGy=
jIc0xNDFAAyAsM2FI7JPg';return true;">http://www.open-std.org/jtc1/<wbr>=
sc22/wg21/docs/papers/2016/</a>.<br>
<br>
Vicente<br>
</div>
</blockquote>
<div><br>
</div>
<div>I think it's a bad choice to not seriously conside=
r
a class introspection/reflection capability that can
support providing comparison operators as library
templates. =C2=A0Maybe these do, but it's not clear t=
o me.</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
It depends if yous data is private or not. It is not clear yet what
we could be able to do reflecting private data.<br></div></blockquote><=
div><br></div><div>I suggested one possibility, for "Components" =
to be a default public class member. =C2=A0"Components" could als=
o be a default protected class member. =C2=A0So the class would have to fri=
end a helper class of comparison or other operator templates in order for t=
he default operator to work for the class. =C2=A0Maybe use of the ++T idiom=
or Ceiton's keyword-based idioms could be the equivalent of protected =
if they accessed private components.</div><div><br></div><div>A big issue w=
ould be, should users of something as basic as comparison operators have to=
deal with template use error hell-spew? =C2=A0But even the most casual use=
rs of C++ should still be using the STL, shouldn't they? =C2=A0I'm =
not sure it's reasonable to shelter even them from template hell-spew.<=
/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/8922074a-fe00-4476-a8ef-8ba5840e1338%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/8922074a-fe00-4476-a8ef-8ba5840e1338=
%40isocpp.org</a>.<br />
------=_Part_2581_537660415.1457306782711--
------=_Part_2580_521731145.1457306782711--
.
Author: Cleiton Santoia <cleitonsantoia@gmail.com>
Date: Sun, 6 Mar 2016 19:16:54 -0800 (PST)
Raw View
------=_Part_2890_918872264.1457320614371
Content-Type: multipart/alternative;
boundary="----=_Part_2891_1138153354.1457320614371"
------=_Part_2891_1138153354.1457320614371
Content-Type: text/plain; charset=UTF-8
>
>
>
> Can you show an example that would work also if the class had private data
> members and base classes?
>
Case 1 private :
typedef<C, is_private>
Case 2 parent classes:
typename<C, is_parent<C>>
--
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/2c7cb187-ad83-4ceb-af8b-1e61d4fb4d0d%40isocpp.org.
------=_Part_2891_1138153354.1457320614371
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"l=
tr"><div><br><br></div><div>Can you show an example that would work also if=
the class had private data members and base classes?=C2=A0</div></div></bl=
ockquote><div><br></div><div><br></div><div>Case 1 private : =C2=A0</div><d=
iv><div class=3D"prettyprint" style=3D"border: 1px solid rgb(187, 187, 187)=
; word-wrap: break-word; background-color: rgb(250, 250, 250);"><code class=
=3D"prettyprint"><div class=3D"subprettyprint"><span style=3D"color: rgb(34=
, 34, 34); background-color: rgb(255, 255, 255);"><font face=3D"courier new=
, monospace"><span style=3D"color: #008;" class=3D"styled-by-prettify">type=
def</span><span style=3D"color: #660;" class=3D"styled-by-prettify"><</s=
pan><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"> is_private</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">></span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> </span></font></span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br></span></div></code></di=
v><br><br></div><div>Case 2 parent classes:</div><div><div class=3D"prettyp=
rint" style=3D"border: 1px solid rgb(187, 187, 187); word-wrap: break-word;=
background-color: rgb(250, 250, 250);"><code class=3D"prettyprint"><div cl=
ass=3D"subprettyprint"><span style=3D"background-color: rgb(255, 255, 255);=
"><font face=3D"courier new, monospace"><span style=3D"color: #008;" class=
=3D"styled-by-prettify">typename</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify"><</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify">C</span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">,</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
is_parent</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
<</span><span style=3D"color: #000;" class=3D"styled-by-prettify">C</spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">>></span>=
</font></span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br=
></span></div></code></div><br><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/2c7cb187-ad83-4ceb-af8b-1e61d4fb4d0d%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/2c7cb187-ad83-4ceb-af8b-1e61d4fb4d0d=
%40isocpp.org</a>.<br />
------=_Part_2891_1138153354.1457320614371--
------=_Part_2890_918872264.1457320614371--
.
Author: Cleiton Santoia <cleitonsantoia@gmail.com>
Date: Sun, 6 Mar 2016 19:45:23 -0800 (PST)
Raw View
------=_Part_680_1974804935.1457322323372
Content-Type: multipart/alternative;
boundary="----=_Part_681_2132948118.1457322323372"
------=_Part_681_2132948118.1457322323372
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
>
> I suggested one possibility, for "Components" to be a default public clas=
s=20
> member. "Components" could also be a default protected class member. So=
=20
> the class would have to friend a helper class of comparison or other=20
> operator templates in order for the default operator to work for the clas=
s.=20
> =20
>
Something like this was suggested before, it's a form "intrusive"=20
reflection, when you (or the compiler) must change something inside the=20
class to make it reflective, the comitee pronouced that it's not what they=
=20
want.
How do you handle classes of a library that you don't have protected access=
=20
to it ? Some library that is not yours to change the code ? or a static=20
library ?
=20
> A big issue would be, should users of something as basic as comparison=20
> operators have to deal with template use error hell-spew? =20
>
But even the most casual users of C++ should still be using the STL,=20
> shouldn't they? I'm not sure it's reasonable to shelter even them from=
=20
> template hell-spew.
>
Regarding the error messages, are you aware of concepts lite=20
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3701.pdf>? This=
=20
is a work to overcome the problem of template error messages (among others)=
..
A casual user must rely in the easy-to-use library solution and the library=
=20
solution may use hell-spew meta-programming tricks in it=C2=B4s implementat=
ion.
=20
BR
CSS
--=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/c84fe5fd-00be-4329-9f6e-0c177c61f3de%40isocpp.or=
g.
------=_Part_681_2132948118.1457322323372
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"l=
tr"><div>I suggested one possibility, for "Components" to be a de=
fault public class member. =C2=A0"Components" could also be a def=
ault protected class member. =C2=A0So the class would have to friend a help=
er class of comparison or other operator templates in order for the default=
operator to work for the class. =C2=A0</div></div></blockquote><div><br></=
div><div><div>Something like this was suggested before, it's a form &qu=
ot;intrusive" reflection, when you (or the compiler) must change somet=
hing inside the class to make it reflective, the comitee pronouced that it&=
#39;s not what they want.</div></div><div>How do you handle classes of a li=
brary that you don't have protected access to it ? Some library that is=
not yours to change the code ? or a static library ?</div><div><br></div><=
div>=C2=A0<br></div><blockquote class=3D"gmail_quote" style=3D"margin: 0;ma=
rgin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=
=3D"ltr"><div></div><div>A big issue would be, should users of something as=
basic as comparison operators have to deal with template use error hell-sp=
ew? =C2=A0</div></div></blockquote><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>But even the most casual users of C++ should st=
ill be using the STL, shouldn't they? =C2=A0I'm not sure it's r=
easonable to shelter even them from template hell-spew.<br></div></div></bl=
ockquote><div><br></div><div><div>Regarding the error messages, are you awa=
re of =C2=A0<a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2=
013/n3701.pdf">concepts lite </a>? This is a work to overcome the problem o=
f template error messages (among others).</div><div>A casual user must rely=
in the easy-to-use library solution and the library solution may use hell-=
spew meta-programming tricks in it=C2=B4s implementation.</div></div><div><=
br></div><div>=C2=A0</div><div>BR</div><div>CSS</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/c84fe5fd-00be-4329-9f6e-0c177c61f3de%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/c84fe5fd-00be-4329-9f6e-0c177c61f3de=
%40isocpp.org</a>.<br />
------=_Part_681_2132948118.1457322323372--
------=_Part_680_1974804935.1457322323372--
.
Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Mon, 7 Mar 2016 08:07:52 +0100
Raw View
This is a multi-part message in MIME format.
--------------090805020806010102040004
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
Le 07/03/2016 04:16, Cleiton Santoia a =C3=A9crit :
>
>
>
> Can you show an example that would work also if the class had
> private data members and base classes?
>
>
>
> Case 1 private :
> |
> typedef<C,is_private>
> |
>
>
Do you mean that this will not need any friend annotation?
Vicente
--=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/56DD28C8.7020708%40wanadoo.fr.
--------------090805020806010102040004
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
">
</head>
<body bgcolor=3D"#FFFFFF" text=3D"#000000">
<div class=3D"moz-cite-prefix">Le 07/03/2016 04:16, Cleiton Santoia a
=C3=A9crit=C2=A0:<br>
</div>
<blockquote
cite=3D"mid:2c7cb187-ad83-4ceb-af8b-1e61d4fb4d0d@isocpp.org"
type=3D"cite">
<div dir=3D"ltr">
<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><br>
<br>
</div>
<div>Can you show an example that would work also if the
class had private data members and base classes?=C2=A0</div>
</div>
</blockquote>
<div><br>
</div>
<div><br>
</div>
<div>Case 1 private : =C2=A0</div>
<div>
<div class=3D"prettyprint" style=3D"border: 1px solid rgb(187,
187, 187); word-wrap: break-word; background-color: rgb(250,
250, 250);"><code class=3D"prettyprint">
<div class=3D"subprettyprint"><span style=3D"color: rgb(34,
34, 34); background-color: rgb(255, 255, 255);"><font
face=3D"courier new, monospace"><span style=3D"color:
#008;" class=3D"styled-by-prettify">typedef</span><sp=
an
style=3D"color: #660;" class=3D"styled-by-prettify">&=
lt;</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">
is_private</span><span style=3D"color: #660;"
class=3D"styled-by-prettify">></span><span
style=3D"color: #000;" class=3D"styled-by-prettify"> =
</span></font></span><span
style=3D"color: #000;" class=3D"styled-by-prettify"><br>
</span></div>
</code></div>
<br>
<br>
</div>
</div>
</blockquote>
<br>
Do you mean that this will not need any friend annotation?<br>
<br>
Vicente<br>
</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/56DD28C8.7020708%40wanadoo.fr?utm_med=
ium=3Demail&utm_source=3Dfooter">https://groups.google.com/a/isocpp.org/d/m=
sgid/std-proposals/56DD28C8.7020708%40wanadoo.fr</a>.<br />
--------------090805020806010102040004--
.
Author: Cleiton Santoia <cleitonsantoia@gmail.com>
Date: Mon, 7 Mar 2016 09:26:01 -0800 (PST)
Raw View
------=_Part_3933_1126998797.1457371562067
Content-Type: multipart/alternative;
boundary="----=_Part_3934_1432170408.1457371562067"
------=_Part_3934_1432170408.1457371562067
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Em segunda-feira, 7 de mar=C3=A7o de 2016 04:07:54 UTC-3, Vicente J. Botet=
=20
Escriba escreveu:
>
> Le 07/03/2016 04:16, Cleiton Santoia a =C3=A9crit :
>
>
>>
>> Can you show an example that would work also if the class had private=20
>> data members and base classes?=20
>>
>
>
> Case 1 private : =20
> typedef<C, is_private>=20
>
>
>
> Do you mean that this will not need any friend annotation?
>
> Vicente
>
In my proposal yes... no annotation, but that it is far from consensus in=
=20
SG7, the last big discussion about it was in urbana ( sorry I don't know=20
about jacksonsville yet ) and the SG7 asked few things:
1 Private access must be provided, but not "accidentally" or "by default"=
=20
you must explicitly ask for it.
2 You should not change the class or members under reflection to become=20
reflective, so you must be able to reflect classes (possibly old) without=
=20
changing them.
3 Even with "outsider" private access, you must have a way to protect=20
"vendor private code" like some compiler intrinsic or some dark corner that=
=20
the vendor don't want or it=C2=B4s not safe to you to look at. =20
But I think (IMO) none of them are "written in stone", I think that somehow=
=20
we will face exceptions to this "rules" if it has some advantage.
This leads to few ( both strange ) alternatives
A-
1 - by default you don't get access to private !=20
2 - you annotate something [[look_at_me]] in the private part so it become=
=20
reflectible. ( going against Rule 2 )
B-
1 - by default you dont get access to private !
2 - but if you ask for "is_private" ( or something like that ) you get=20
private access, unless...
3 - you write something in the class [[dont_look_here]] annotation to=20
forbid private access. ( also going against Rule 2 )=20
And also remember that this access is constrained by what your compilation=
=20
unit can see.
And don't get me started with modules....
BR
CSS
--=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/840b1f9a-be05-4454-b20d-99e2ccb3c1f1%40isocpp.or=
g.
------=_Part_3934_1432170408.1457371562067
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br>Em segunda-feira, 7 de mar=C3=A7o de 2016 04:07:54=
UTC-3, Vicente J. Botet Escriba escreveu:<blockquote class=3D"gmail_quote=
" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding=
-left: 1ex;">
=20
=20
=20
<div bgcolor=3D"#FFFFFF" text=3D"#000000">
<div>Le 07/03/2016 04:16, Cleiton Santoia a
=C3=A9crit=C2=A0:<br>
</div>
<blockquote type=3D"cite">
<div dir=3D"ltr">
<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8=
ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir=3D"ltr">
<div><br>
<br>
</div>
<div>Can you show an example that would work also if the
class had private data members and base classes?=C2=A0</div>
</div>
</blockquote>
<div><br>
</div>
<div><br>
</div>
<div>Case 1 private : =C2=A0</div>
<div>
<div style=3D"border:1px solid rgb(187,187,187);word-wrap:break-w=
ord;background-color:rgb(250,250,250)"><code>
<div><span style=3D"color:rgb(34,34,34);background-color:rgb(=
255,255,255)"><font face=3D"courier new, monospace"><span style=3D"color:#0=
08">typedef</span><span style=3D"color:#660"><</span><span style=3D"colo=
r:#000">C</span><span style=3D"color:#660">,</span><span style=3D"color:#00=
0">
is_private</span><span style=3D"color:#660">></spa=
n><span style=3D"color:#000"> </span></font></span><span style=3D"color:#00=
0"><br>
</span></div>
</code></div>
<br>
<br>
</div>
</div>
</blockquote>
<br>
Do you mean that this will not need any friend annotation?<br>
<br>
Vicente<br></div></blockquote><div><br></div><div>In my proposal yes...=
no annotation, but that it is far from consensus in SG7, the last big disc=
ussion about it was in urbana ( sorry I don't know about jacksonsville =
yet ) and the SG7 asked few things:</div><div><br></div><div>1 Private acce=
ss must be provided, but not "accidentally" or "by default&q=
uot; you must explicitly ask for it.</div><div>2 You should not change the =
class or members under reflection to become reflective, so you must be able=
to reflect classes (possibly old) without changing them.</div><div>3 Even =
with "outsider" private access, you must have a way to protect &q=
uot;vendor private code" like some compiler intrinsic or some dark cor=
ner that the vendor don't want or it=C2=B4s not safe to you to look at.=
=C2=A0</div><div><br></div><div>But I think=C2=A0(IMO)=C2=A0none of them a=
re "written in stone", I think that somehow we will face exceptio=
ns to this "rules" if it has some advantage.</div><div><br></div>=
<div>This leads to few ( both strange ) alternatives</div><div><br></div><d=
iv>A-</div><div>1 - by default you don't get access to private !=C2=A0<=
/div><div>2 - you annotate something [[look_at_me]] in the private part so =
it become reflectible. ( going against Rule 2 )</div><div><br></div><div>B-=
</div><div>1 - by default you dont get access to private !</div><div>2 - bu=
t if you ask for "is_private" ( or something like that ) you get =
private access, unless...</div><div>3 - you write something in the class [[=
dont_look_here]] annotation to forbid private access. ( also going against =
Rule 2 )=C2=A0</div><div><br></div><div>And also remember that this access =
is constrained by what your compilation unit can see.</div><div>And don'=
;t get me started with modules....<br></div><div><br></div><div><br></div><=
div>BR</div><div>CSS</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/840b1f9a-be05-4454-b20d-99e2ccb3c1f1%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/840b1f9a-be05-4454-b20d-99e2ccb3c1f1=
%40isocpp.org</a>.<br />
------=_Part_3934_1432170408.1457371562067--
------=_Part_3933_1126998797.1457371562067--
.
Author: "'Walt Karas' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Mon, 7 Mar 2016 11:25:49 -0800 (PST)
Raw View
------=_Part_14_2075233692.1457378749524
Content-Type: multipart/alternative;
boundary="----=_Part_15_1267560024.1457378749525"
------=_Part_15_1267560024.1457378749525
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
On Monday, March 7, 2016 at 12:26:02 PM UTC-5, Cleiton Santoia wrote:
>
>
>
> Em segunda-feira, 7 de mar=C3=A7o de 2016 04:07:54 UTC-3, Vicente J. Bote=
t=20
> Escriba escreveu:
>>
>> Le 07/03/2016 04:16, Cleiton Santoia a =C3=A9crit :
>>
>>
>>>
>>> Can you show an example that would work also if the class had private=
=20
>>> data members and base classes?=20
>>>
>>
>>
>> Case 1 private : =20
>> typedef<C, is_private>=20
>>
>>
>>
>> Do you mean that this will not need any friend annotation?
>>
>> Vicente
>>
>
> In my proposal yes... no annotation, but that it is far from consensus in=
=20
> SG7, the last big discussion about it was in urbana ( sorry I don't know=
=20
> about jacksonsville yet ) and the SG7 asked few things:
>
> 1 Private access must be provided, but not "accidentally" or "by default"=
=20
> you must explicitly ask for it.
> 2 You should not change the class or members under reflection to become=
=20
> reflective, so you must be able to reflect classes (possibly old) without=
=20
> changing them.
> 3 Even with "outsider" private access, you must have a way to protect=20
> "vendor private code" like some compiler intrinsic or some dark corner th=
at=20
> the vendor don't want or it=C2=B4s not safe to you to look at. =20
>
> But I think (IMO) none of them are "written in stone", I think that=20
> somehow we will face exceptions to this "rules" if it has some advantage.
>
> This leads to few ( both strange ) alternatives
>
> A-
> 1 - by default you don't get access to private !=20
> 2 - you annotate something [[look_at_me]] in the private part so it becom=
e=20
> reflectible. ( going against Rule 2 )
>
> B-
> 1 - by default you dont get access to private !
> 2 - but if you ask for "is_private" ( or something like that ) you get=20
> private access, unless...
> 3 - you write something in the class [[dont_look_here]] annotation to=20
> forbid private access. ( also going against Rule 2 )=20
>
> And also remember that this access is constrained by what your compilatio=
n=20
> unit can see.
> And don't get me started with modules....
>
>
> BR
> CSS
>
In the example you gave for a generic =3D=3D operator, the equals_helper=20
template function could be wrapped in a helper class. A class with=20
non-public data components could friend the helper class if the generic=20
operator was correct for it. In a sense, the default constructors,=20
destructor and assignment operator are all reinventions of the "foreach=20
component reflection" wheel. We can continue the multiple reinventions for=
=20
the comparison operators (also a violation of strictest respect for access=
=20
control). Or (assuming that friending a helper class works in general)=20
classes with non-public data components can acknowledge library default=20
functions and operators with a single simple friend declaration. Lobbyists=
=20
for companies wanting to sell library include file upgrades will wine and=
=20
dine the Committee in support of this.
Since you mention an is_base predicate, I assume that means you have some=
=20
sort of member pointer to a base class, but I see no explicit discussion of=
=20
that.=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/390f2de7-6ab3-47cc-b76c-a7454dec5fc5%40isocpp.or=
g.
------=_Part_15_1267560024.1457378749525
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br>On Monday, March 7, 2016 at 12:26:02 PM UTC-5, Cle=
iton Santoia wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;mar=
gin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D=
"ltr"><br><br>Em segunda-feira, 7 de mar=C3=A7o de 2016 04:07:54 UTC-3, Vic=
ente J. Botet Escriba escreveu:<blockquote class=3D"gmail_quote" style=3D"=
margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">
=20
=20
=20
<div bgcolor=3D"#FFFFFF" text=3D"#000000">
<div>Le 07/03/2016 04:16, Cleiton Santoia a
=C3=A9crit=C2=A0:<br>
</div>
<blockquote type=3D"cite">
<div dir=3D"ltr">
<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8=
ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir=3D"ltr">
<div><br>
<br>
</div>
<div>Can you show an example that would work also if the
class had private data members and base classes?=C2=A0</div>
</div>
</blockquote>
<div><br>
</div>
<div><br>
</div>
<div>Case 1 private : =C2=A0</div>
<div>
<div style=3D"border:1px solid rgb(187,187,187);word-wrap:break-w=
ord;background-color:rgb(250,250,250)"><code>
<div><span style=3D"color:rgb(34,34,34);background-color:rgb(=
255,255,255)"><font face=3D"courier new, monospace"><span style=3D"color:#0=
08">typedef</span><span style=3D"color:#660"><</span><span style=3D"colo=
r:#000">C</span><span style=3D"color:#660">,</span><span style=3D"color:#00=
0">
is_private</span><span style=3D"color:#660">></spa=
n><span style=3D"color:#000"> </span></font></span><span style=3D"color:#00=
0"><br>
</span></div>
</code></div>
<br>
<br>
</div>
</div>
</blockquote>
<br>
Do you mean that this will not need any friend annotation?<br>
<br>
Vicente<br></div></blockquote><div><br></div><div>In my proposal yes...=
no annotation, but that it is far from consensus in SG7, the last big disc=
ussion about it was in urbana ( sorry I don't know about jacksonsville =
yet ) and the SG7 asked few things:</div><div><br></div><div>1 Private acce=
ss must be provided, but not "accidentally" or "by default&q=
uot; you must explicitly ask for it.</div><div>2 You should not change the =
class or members under reflection to become reflective, so you must be able=
to reflect classes (possibly old) without changing them.</div><div>3 Even =
with "outsider" private access, you must have a way to protect &q=
uot;vendor private code" like some compiler intrinsic or some dark cor=
ner that the vendor don't want or it=C2=B4s not safe to you to look at.=
=C2=A0</div><div><br></div><div>But I think=C2=A0(IMO)=C2=A0none of them a=
re "written in stone", I think that somehow we will face exceptio=
ns to this "rules" if it has some advantage.</div><div><br></div>=
<div>This leads to few ( both strange ) alternatives</div><div><br></div><d=
iv>A-</div><div>1 - by default you don't get access to private !=C2=A0<=
/div><div>2 - you annotate something [[look_at_me]] in the private part so =
it become reflectible. ( going against Rule 2 )</div><div><br></div><div>B-=
</div><div>1 - by default you dont get access to private !</div><div>2 - bu=
t if you ask for "is_private" ( or something like that ) you get =
private access, unless...</div><div>3 - you write something in the class [[=
dont_look_here]] annotation to forbid private access. ( also going against =
Rule 2 )=C2=A0</div><div><br></div><div>And also remember that this access =
is constrained by what your compilation unit can see.</div><div>And don'=
;t get me started with modules....<br></div><div><br></div><div><br></div><=
div>BR</div><div>CSS</div></div></blockquote><div><br>In the example you ga=
ve for a generic =3D=3D operator, the equals_helper template function could=
be wrapped in a helper class.=C2=A0 A class with non-public data component=
s could friend the helper class if the generic operator was correct for it.=
=C2=A0 In a sense, the default constructors, destructor and assignment oper=
ator are all reinventions of the "foreach component reflection" w=
heel.=C2=A0 We can continue the multiple reinventions for the comparison op=
erators (also a violation of strictest respect for access control).=C2=A0 O=
r (assuming that friending a helper class works in general) classes with no=
n-public data components can acknowledge library default functions and oper=
ators with a single simple friend declaration.=C2=A0 Lobbyists for companie=
s wanting to sell library include file upgrades will wine and dine the Comm=
ittee in support of this.<br><br>Since you mention an is_base predicate, I =
assume that means you have some sort of member pointer to a base class, but=
I see no explicit discussion of that. <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/390f2de7-6ab3-47cc-b76c-a7454dec5fc5%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/390f2de7-6ab3-47cc-b76c-a7454dec5fc5=
%40isocpp.org</a>.<br />
------=_Part_15_1267560024.1457378749525--
------=_Part_14_2075233692.1457378749524--
.
Author: "'Walt Karas' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Mon, 7 Mar 2016 11:33:30 -0800 (PST)
Raw View
------=_Part_447_1339118543.1457379210230
Content-Type: multipart/alternative;
boundary="----=_Part_448_2122990370.1457379210230"
------=_Part_448_2122990370.1457379210230
Content-Type: text/plain; charset=UTF-8
On Sunday, March 6, 2016 at 2:40:30 PM UTC-5, Cleiton Santoia wrote:
>
>
>> Experience has shown that good layered architectures are generally
>> advantageous. A rule of thumb for a good layered architecture is to have
>> one capability in a lower layer that supports multiple capabilities in a
>> higher layer. As opposed to supporting just one or some or all of those
>> multiple capabilities in the lower layer. The base language is the lowest
>> layer of the C++ architecture. Therefore, I think it's likely to be better
>> to have a capability in the base language that allows for support of
>> reasonably good generic comparison operators, generic stream input/output
>> operators, generic std::hash, maybe generic JSON/XML input/output, etc
>> using library code above the base layer.
>>
>
> In the both reflection proposals there are a sample of JSON serialization
> (in sligtly different ways), but both static and without "mapping"
> functions.
> You dont need that "Component" structure you proposed, you just expand the
> pack thru folding.
>
> Here the code <http://coliru.stacked-crooked.com/view?id=b907dd58003a2748> your
> 10 liner 'operator ==' lib-olny on top of reflection ( from line 8 to 18 ).
>
> Please pay attention on lines 10 and 16, in 10 we have a "template
> folding" and in 16 we have the only line that will change after reflection
> be accepted (hopefully).
>
In line 10 it might be good to replace c1.*m == c2.*m with a function
within a class template with simple == as its base definition. The motive
being that this class template could be specialized to "fix" the default ==
rather than discarding it if simple == wasn't appropriate for a few
components among many.
--
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/6c282596-68ad-4e61-a137-6142ae5d9c16%40isocpp.org.
------=_Part_448_2122990370.1457379210230
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br>On Sunday, March 6, 2016 at 2:40:30 PM UTC-5, Clei=
ton Santoia wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;marg=
in-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"=
ltr"><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><br></di=
v><div>Experience has shown that good layered architectures are generally a=
dvantageous. =C2=A0A rule of thumb for a good layered architecture is to ha=
ve one capability in a lower layer that supports multiple capabilities in a=
higher layer. =C2=A0As opposed to supporting just one or some or all of th=
ose multiple capabilities in the lower layer. =C2=A0The base language is th=
e lowest layer of the C++ architecture. =C2=A0Therefore, I think it's l=
ikely to be better to have a capability in the base language that allows fo=
r support of reasonably good generic comparison operators, generic stream i=
nput/output operators, generic std::hash, maybe generic JSON/XML input/outp=
ut, etc using library code above the base layer.</div></div></blockquote><d=
iv><br></div><div>In the both reflection proposals there are a sample of JS=
ON serialization (in sligtly different ways), but both static and without &=
quot;mapping" functions.<br></div><div>You dont need that "Compon=
ent" structure you proposed, you just expand the pack thru folding.=C2=
=A0<br></div><div><br></div><div>Here <a href=3D"http://coliru.stacked-croo=
ked.com/view?id=3Db907dd58003a2748" target=3D"_blank" rel=3D"nofollow" onmo=
usedown=3D"this.href=3D'http://www.google.com/url?q\75http%3A%2F%2Fcoli=
ru.stacked-crooked.com%2Fview%3Fid%3Db907dd58003a2748\46sa\75D\46sntz\0751\=
46usg\75AFQjCNHkLoGXQXLUjEgf9-GztbSysVY81g';return true;" onclick=3D"th=
is.href=3D'http://www.google.com/url?q\75http%3A%2F%2Fcoliru.stacked-cr=
ooked.com%2Fview%3Fid%3Db907dd58003a2748\46sa\75D\46sntz\0751\46usg\75AFQjC=
NHkLoGXQXLUjEgf9-GztbSysVY81g';return true;">the code</a>=C2=A0your 10 =
liner 'operator =3D=3D' lib-olny on top of reflection ( from line 8=
to 18 ).=C2=A0<br></div><div><br></div><div>Please pay attention on lines =
10 and 16, in 10 we have a "template folding" and in 16 we have t=
he only line that will change after reflection be accepted=C2=A0(hopefully)=
..</div></div></blockquote><div><br>In line 10 it might be good to replace c=
1.*m =3D=3D c2.*m with a function within a class template with simple =3D=
=3D as its base definition.=C2=A0 The motive being that this class template=
could be specialized to "fix" the default =3D=3D rather than dis=
carding it if simple =3D=3D wasn't appropriate for a few components amo=
ng many.<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/6c282596-68ad-4e61-a137-6142ae5d9c16%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/6c282596-68ad-4e61-a137-6142ae5d9c16=
%40isocpp.org</a>.<br />
------=_Part_448_2122990370.1457379210230--
------=_Part_447_1339118543.1457379210230--
.
Author: Cleiton Santoia <cleitonsantoia@gmail.com>
Date: Tue, 8 Mar 2016 08:31:07 -0800 (PST)
Raw View
------=_Part_180_1155276388.1457454667175
Content-Type: multipart/alternative;
boundary="----=_Part_181_1148837050.1457454667175"
------=_Part_181_1148837050.1457454667175
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
>
> In the example you gave for a generic =3D=3D operator, the equals_helper=
=20
> template function could be wrapped in a helper class. A class with=20
> non-public data components could friend the helper class if the generic=
=20
> operator was correct for it. In a sense, the default constructors,=20
> destructor and assignment operator are all reinventions of the "foreach=
=20
> component reflection" wheel. We can continue the multiple reinventions f=
or=20
> the comparison operators (also a violation of strictest respect for acces=
s=20
> control). Or (assuming that friending a helper class works in general)=
=20
> classes with non-public data components can acknowledge library default=
=20
> functions and operators with a single simple friend declaration. Lobbyis=
ts=20
> for companies wanting to sell library include file upgrades will wine and=
=20
> dine the Committee in support of this.
>
My intent is to make a two cents contribution and show how terse and easy=
=20
can be (reflection + folding) to solve the problem of the subject of this=
=20
topic, also give a alternative solution than you thought, without need for=
=20
mapping classes nor "Component/Class/Fields" structures. I=C2=B4m not tryin=
g to=20
provide the whole solution for default comparison nor solve all issues in L=
awrence=20
Crowl =E2=80=9CComparison is not simple, but it can be simpler"=20
<https://www.youtube.com/watch?v=3Dfi0CQ7laiXE> but if you wish, you can sh=
ow=20
us your idea then we can comment on it.
=20
> Since you mention an is_base predicate, I assume that means you have some=
=20
> sort of member pointer to a base class, but I see no explicit discussion =
of=20
> that.=20
>
Sorry, I did not get this, why you need a member pointer to a base class ?=
=20
struct X{
};
struct Y : X {
X* base;
};
you mean this ???
--=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/741522c6-22f7-441d-81ab-e1ca44e085dc%40isocpp.or=
g.
------=_Part_181_1148837050.1457454667175
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<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>In the e=
xample you gave for a generic =3D=3D operator, the equals_helper template f=
unction could be wrapped in a helper class. A class with non-public data co=
mponents could friend the helper class if the generic operator was correct =
for it.=C2=A0 In a sense, the default constructors, destructor and assignme=
nt operator are all reinventions of the "foreach component reflection&=
quot; wheel.=C2=A0 We can continue the multiple reinventions for the compar=
ison operators (also a violation of strictest respect for access control).=
=C2=A0 Or (assuming that friending a helper class works in general) classes=
with non-public data components can acknowledge library default functions =
and operators with a single simple friend declaration.=C2=A0 Lobbyists for =
companies wanting to sell library include file upgrades will wine and dine =
the Committee in support of this.</div></div></blockquote><div><br></div><d=
iv>My intent is to make a two cents contribution and show how terse and eas=
y can be (reflection + folding) to solve the problem of the subject of this=
topic, also give a alternative solution than you thought, without need for=
mapping classes nor "Component/Class/Fields" structures. I=C2=B4=
m not trying to provide the whole solution for default comparison nor solve=
all issues in <a href=3D"https://www.youtube.com/watch?v=3Dfi0CQ7laiXE">La=
wrence Crowl =E2=80=9CComparison is not simple, but it can be simpler"=
</a>=C2=A0but if you wish, you can show us your idea then we can comment on=
it.</div><div><br></div><div>=C2=A0</div><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>Since you mention an is_base predicate, I=
assume that means you have some sort of member pointer to a base class, bu=
t I see no explicit discussion of that. <br></div></div></blockquote><div><=
br></div><div>Sorry, I did not get this, why you need a member pointer to a=
base class ?=C2=A0</div><div><br></div><div><div class=3D"prettyprint" sty=
le=3D"border: 1px solid rgb(187, 187, 187); word-wrap: break-word; backgrou=
nd-color: rgb(250, 250, 250);"><code class=3D"prettyprint"><div class=3D"su=
bprettyprint"><span style=3D"color: #008;" class=3D"styled-by-prettify">str=
uct</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> X</spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">{</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">};</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"><br><br></span><span style=3D"color:=
#008;" class=3D"styled-by-prettify">struct</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"> Y </span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">:</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"> X </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=A0X</span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">*</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
</span><span style=3D"color: #008;" class=3D"styled-by-prettify">base</spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">;</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">};</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"><br></span></div></code></div><div><=
br></div>you mean this ???</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/741522c6-22f7-441d-81ab-e1ca44e085dc%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/741522c6-22f7-441d-81ab-e1ca44e085dc=
%40isocpp.org</a>.<br />
------=_Part_181_1148837050.1457454667175--
------=_Part_180_1155276388.1457454667175--
.
Author: "'Walt Karas' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Tue, 8 Mar 2016 09:40:22 -0800 (PST)
Raw View
------=_Part_4968_55014460.1457458822262
Content-Type: multipart/alternative;
boundary="----=_Part_4969_1608318564.1457458822263"
------=_Part_4969_1608318564.1457458822263
Content-Type: text/plain; charset=UTF-8
On Tuesday, March 8, 2016 at 11:31:07 AM UTC-5, Cleiton Santoia wrote
>
>
>
>> Since you mention an is_base predicate, I assume that means you have some
>> sort of member pointer to a base class, but I see no explicit discussion of
>> that.
>>
>
> Sorry, I did not get this, why you need a member pointer to a base class ?
>
> struct X{
> };
>
> struct Y : X {
> X* base;
> };
>
> you mean this ???
>
I meant that, if reflection were to be used to provide general default
comparison operators, it would have to be able to "reflect upon" base
classes as well as (other) data members.
--
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/b9f32b39-94e0-412f-9a87-6fe118b10b02%40isocpp.org.
------=_Part_4969_1608318564.1457458822263
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br>On Tuesday, March 8, 2016 at 11:31:07 AM UTC-5, Cl=
eiton Santoia wrote<blockquote class=3D"gmail_quote" style=3D"margin: 0;mar=
gin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div>=C2=A0=
</div><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>Since y=
ou mention an is_base predicate, I assume that means you have some sort of =
member pointer to a base class, but I see no explicit discussion of that. <=
br></div></div></blockquote><div><br></div><div>Sorry, I did not get this, =
why you need a member pointer to a base class ?=C2=A0</div><div><br></div><=
div><div style=3D"border:1px solid rgb(187,187,187);word-wrap:break-word;ba=
ckground-color:rgb(250,250,250)"><code><div><span style=3D"color:#008">stru=
ct</span><span style=3D"color:#000"> X</span><span style=3D"color:#660">{</=
span><span style=3D"color:#000"><br></span><span style=3D"color:#660">};</s=
pan><span style=3D"color:#000"><br><br></span><span style=3D"color:#008">st=
ruct</span><span style=3D"color:#000"> Y </span><span style=3D"color:#660">=
:</span><span style=3D"color:#000"> X </span><span style=3D"color:#660">{</=
span><span style=3D"color:#000"><br>=C2=A0 =C2=A0X</span><span style=3D"col=
or:#660">*</span><span style=3D"color:#000"> </span><span style=3D"color:#0=
08">base</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><div><br></div>you mean this ???</div></bloc=
kquote><div><br>I meant that, if reflection were to be used to provide gene=
ral default comparison operators, it would have to be able to "reflect=
upon" base classes as well as (other) data members. <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/b9f32b39-94e0-412f-9a87-6fe118b10b02%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/b9f32b39-94e0-412f-9a87-6fe118b10b02=
%40isocpp.org</a>.<br />
------=_Part_4969_1608318564.1457458822263--
------=_Part_4968_55014460.1457458822262--
.
Author: Cleiton Santoia <cleitonsantoia@gmail.com>
Date: Tue, 8 Mar 2016 19:58:14 -0800 (PST)
Raw View
------=_Part_5365_258945837.1457495894701
Content-Type: multipart/alternative;
boundary="----=_Part_5366_1407294409.1457495894701"
------=_Part_5366_1407294409.1457495894701
Content-Type: text/plain; charset=UTF-8
>
>
>> I meant that, if reflection were to be used to provide general default
> comparison operators, it would have to be able to "reflect upon" base
> classes as well as (other) data members.
>
In my initial design I thought of bring all inherited in 'typedef' by
default, because it's easy to sort out what you don't want, but this idea
has some drawbacks, I am hoping to put on straw poll this part of the
design :)
For now you cas ask for
typedef<X, is_member_object_pointer> // all inherited
methods
typedef<X, is_member_object_pointer && is_defined_in<X>> // only defined
in X skip inherited
but I think you are hoping for something more complex don't you
template<class C>
void get_members_from_classe() {
}
template<class ... Classes>
void get_members_from_classes() {
}
template<class C>
void get_members_from_parent_classes() {
get_members_from_class<C>();
}
--
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/74980e61-cfdf-43b1-8bb4-e56263d083bb%40isocpp.org.
------=_Part_5366_1407294409.1457495894701
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"l=
tr"><blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;b=
order-left:1px #ccc solid;padding-left:1ex"><br></blockquote><div>I meant t=
hat, if reflection were to be used to provide general default comparison op=
erators, it would have to be able to "reflect upon" base classes =
as well as (other) data members. <br></div></div></blockquote><div><br></di=
v><div>In my initial design I thought of bring all inherited in 'typede=
f' by default, because it's easy to sort out what you don't wan=
t, but this idea has some drawbacks, I am hoping to put on straw poll this =
part of the design :)</div><div><br></div><div>For now you cas ask for</div=
><div><div class=3D"prettyprint" style=3D"border: 1px solid rgb(187, 187, 1=
87); word-wrap: break-word; background-color: rgb(250, 250, 250);"><code cl=
ass=3D"prettyprint"><div class=3D"subprettyprint"><font face=3D"courier new=
, monospace"><span style=3D"color: #008;" class=3D"styled-by-prettify">type=
def</span><span style=3D"color: #660;" class=3D"styled-by-prettify"><</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify">X</span><span=
style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D=
"color: #000;" class=3D"styled-by-prettify"> is_member_object_pointer</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">></span><span=
style=3D"color: #000;" class=3D"styled-by-prettify"> =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=
=3D"color: #800;" class=3D"styled-by-prettify">// all inherited methods</sp=
an><span style=3D"background-color: rgb(255, 255, 255);"><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #0=
08;" class=3D"styled-by-prettify">typedef</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify"><</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify">X</span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"> </span></span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify">is_member_object_pointer </span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">&&</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify"> is_defined_in</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify"><</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify">X</span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">>></span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"> =C2=A0 </span><span style=3D"color: #800;" class=3D"styled-by-prett=
ify">// only defined in X skip inherited</span></font></div></code></div><b=
r>but I think you are hoping for something more complex don't you=C2=A0=
</div><div><br></div><div><div class=3D"prettyprint" style=3D"border: 1px s=
olid rgb(187, 187, 187); word-wrap: break-word; background-color: rgb(250, =
250, 250);"><code class=3D"prettyprint"><div class=3D"subprettyprint"><span=
style=3D"color: #008;" class=3D"styled-by-prettify">template</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify"><</span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">class</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> C</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">></span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"><br></span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">void</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> get_members_from_classe</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: #000;" class=3D"styled-by-pret=
tify"><br><br></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: #008;" class=3D"styled-by-prettify">templat=
e</span><span style=3D"color: #660;" class=3D"styled-by-prettify"><</spa=
n><span style=3D"color: #008;" class=3D"styled-by-prettify">class</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=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: #606;=
" class=3D"styled-by-prettify">Classes</span><span style=3D"color: #660;" c=
lass=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">void</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"> get_members_from_classes</span><span style=3D"color: #660;" cl=
ass=3D"styled-by-prettify">()</span><span style=3D"color: #000;" class=3D"s=
tyled-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><br></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 style=3D"color: #008;" class=3D"styled-by-prettify">template</sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify"><</span><sp=
an style=3D"color: #008;" class=3D"styled-by-prettify">class</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> C</span><span style=3D"c=
olor: #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"styled-by-prettify">void</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> get_members_from_parent_classes</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">()</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>=C2=A0 =C2=A0 get_members_from_class</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify"><</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></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></div></code></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/74980e61-cfdf-43b1-8bb4-e56263d083bb%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/74980e61-cfdf-43b1-8bb4-e56263d083bb=
%40isocpp.org</a>.<br />
------=_Part_5366_1407294409.1457495894701--
------=_Part_5365_258945837.1457495894701--
.
Author: Cleiton Santoia <cleitonsantoia@gmail.com>
Date: Tue, 8 Mar 2016 20:07:17 -0800 (PST)
Raw View
------=_Part_5447_117501046.1457496437857
Content-Type: multipart/alternative;
boundary="----=_Part_5448_1861076731.1457496437857"
------=_Part_5448_1861076731.1457496437857
Content-Type: text/plain; charset=UTF-8
sorry, accidentally poster before ended the code
template<class C>
void get_members_from_class() {
//something with typedef<C, is_member_object>...
}
template<class first> // the last one
void get_members_from_classes() {
get_members_from_classe<first>();
}
template<class first, class ... Rest>
void get_members_from_classes() {
get_members_from_classe<first>();
get_members_from_classes<Rest>(); // recursion
}
template<class C>
void get_members_from_parent_classes() {
get_members_from_classes< typename<C, is_base_class<C>>... >();
}
BR
CSS
--
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/b9eeb7ba-9d2a-4312-b18d-2c327f9e032f%40isocpp.org.
------=_Part_5448_1861076731.1457496437857
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">sorry, accidentally poster before ended the code<br><div><=
br></div><div><div class=3D"prettyprint" style=3D"border: 1px solid rgb(187=
, 187, 187); word-wrap: break-word; background-color: rgb(250, 250, 250);">=
<code class=3D"prettyprint"><div class=3D"subprettyprint"><div class=3D"sub=
prettyprint"><font color=3D"#660066">template<class C></font></div><d=
iv class=3D"subprettyprint"><font color=3D"#660066">void get_members_from_c=
lass() {</font></div><div class=3D"subprettyprint"><font color=3D"#660066">=
=C2=A0 =C2=A0//something with typedef<C, is_member_object>...</font><=
/div><div class=3D"subprettyprint"><font color=3D"#660066">}</font></div><d=
iv class=3D"subprettyprint"><font color=3D"#660066"><br></font></div><div c=
lass=3D"subprettyprint"><font color=3D"#660066">template<class first>=
// the last one</font></div><div class=3D"subprettyprint"><font color=3D"#=
660066">void get_members_from_classes() {</font></div><div class=3D"subpret=
typrint"><font color=3D"#660066">=C2=A0 =C2=A0 get_members_from_classe<f=
irst>();</font></div><div class=3D"subprettyprint"><font color=3D"#66006=
6">}</font></div><div class=3D"subprettyprint"><font color=3D"#660066"><br>=
</font></div><div class=3D"subprettyprint"><font color=3D"#660066">template=
<class first, class ... Rest></font></div><div class=3D"subprettyprin=
t"><font color=3D"#660066">void get_members_from_classes() {</font></div><d=
iv class=3D"subprettyprint"><font color=3D"#660066">=C2=A0 =C2=A0 get_membe=
rs_from_classe<first>();</font></div><div class=3D"subprettyprint"><f=
ont color=3D"#660066">=C2=A0 =C2=A0 get_members_from_classes<Rest>();=
// recursion</font></div><div class=3D"subprettyprint"><font color=3D"#660=
066">}</font></div><div class=3D"subprettyprint"><font color=3D"#660066"><b=
r></font></div><div class=3D"subprettyprint"><font color=3D"#660066">templa=
te<class C></font></div><div class=3D"subprettyprint"><font color=3D"=
#660066">void get_members_from_parent_classes() {</font></div><div class=3D=
"subprettyprint"><font color=3D"#660066">=C2=A0 =C2=A0 get_members_from_cla=
sses< typename<C, is_base_class<C>>... >();</font></div><=
div class=3D"subprettyprint"><font color=3D"#660066">}</font></div><div><br=
></div></div></code></div><div><br></div>BR</div><div>CSS<br>=C2=A0</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/b9eeb7ba-9d2a-4312-b18d-2c327f9e032f%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/b9eeb7ba-9d2a-4312-b18d-2c327f9e032f=
%40isocpp.org</a>.<br />
------=_Part_5448_1861076731.1457496437857--
------=_Part_5447_117501046.1457496437857--
.
Author: "'Walt Karas' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Wed, 9 Mar 2016 04:57:58 -0800 (PST)
Raw View
------=_Part_235_258947047.1457528278857
Content-Type: multipart/alternative;
boundary="----=_Part_236_1314174077.1457528278857"
------=_Part_236_1314174077.1457528278857
Content-Type: text/plain; charset=UTF-8
On Tuesday, March 8, 2016 at 10:58:15 PM UTC-5, Cleiton Santoia wrote:
>
>
>>> I meant that, if reflection were to be used to provide general default
>> comparison operators, it would have to be able to "reflect upon" base
>> classes as well as (other) data members.
>>
>
> In my initial design I thought of bring all inherited in 'typedef' by
> default, because it's easy to sort out what you don't want, but this idea
> has some drawbacks, I am hoping to put on straw poll this part of the
> design :)
>
> For now you cas ask for
> typedef<X, is_member_object_pointer> // all
> inherited methods
> typedef<X, is_member_object_pointer && is_defined_in<X>> // only
> defined in X skip inherited
>
> but I think you are hoping for something more complex don't you
>
> template<class C>
> void get_members_from_classe() {
>
> }
>
> template<class ... Classes>
> void get_members_from_classes() {
>
> }
>
> template<class C>
> void get_members_from_parent_classes() {
> get_members_from_class<C>();
> }
>
No I was thinking member pointers could be extended to support base classes:
Base Derived::*p = &Derived::Base;
I think handling of the members/base classes of the base class could best
be handled by recursion. For example, for operator ==, the == for the base
class (generic or otherwise) would simply be called by the generic == for
the derived 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/4612cf90-7ca4-4d4e-9137-b535200a0950%40isocpp.org.
------=_Part_236_1314174077.1457528278857
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On Tuesday, March 8, 2016 at 10:58:15 PM UTC-5, Cleiton Sa=
ntoia wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-lef=
t: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><=
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"><blockquote class=
=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc s=
olid;padding-left:1ex"><br></blockquote><div>I meant that, if reflection we=
re to be used to provide general default comparison operators, it would hav=
e to be able to "reflect upon" base classes as well as (other) da=
ta members. <br></div></div></blockquote><div><br></div><div>In my initial =
design I thought of bring all inherited in 'typedef' by default, be=
cause it's easy to sort out what you don't want, but this idea has =
some drawbacks, I am hoping to put on straw poll this part of the design :)=
</div><div><br></div><div>For now you cas ask for</div><div><div style=3D"b=
order:1px solid rgb(187,187,187);word-wrap:break-word;background-color:rgb(=
250,250,250)"><code><div><font face=3D"courier new, monospace"><span style=
=3D"color:#008">typedef</span><span style=3D"color:#660"><</span><span s=
tyle=3D"color:#000">X</span><span style=3D"color:#660">,</span><span style=
=3D"color:#000"> is_member_object_pointer</span><span style=3D"color:#660">=
></span><span style=3D"color:#000"> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color:#800"=
>// all inherited methods</span><span style=3D"background-color:rgb(255,255=
,255)"><span style=3D"color:#000"><br></span><span style=3D"color:#008">typ=
edef</span><span style=3D"color:#660"><</span><span style=3D"color:#000"=
>X</span><span style=3D"color:#660">,</span><span style=3D"color:#000"> </s=
pan></span><span style=3D"color:#000">is_member_object_pointer </span><span=
style=3D"color:#660">&&</span><span style=3D"color:#000"> is_defin=
ed_in</span><span style=3D"color:#660"><</span><span style=3D"color:#000=
">X</span><span style=3D"color:#660">>></span><span style=3D"color:#0=
00"> =C2=A0 </span><span style=3D"color:#800">// only defined in X skip inh=
erited</span></font></div></code></div><br>but I think you are hoping for s=
omething more complex don't you=C2=A0</div><div><br></div><div><div sty=
le=3D"border:1px solid rgb(187,187,187);word-wrap:break-word;background-col=
or:rgb(250,250,250)"><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"> C</span><span style=3D"color:#660">></span>=
<span style=3D"color:#000"><br></span><span style=3D"color:#008">void</span=
><span style=3D"color:#000"> get_members_from_classe</span><span style=3D"c=
olor:#660">()</span><span style=3D"color:#000"> </span><span style=3D"color=
:#660">{</span><span style=3D"color:#000"><br><br></span><span style=3D"col=
or:#660">}</span><span style=3D"color:#000"><br><br></span><span style=3D"c=
olor:#008">template</span><span style=3D"color:#660"><</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"> </span><span style=3D=
"color:#606">Classes</span><span style=3D"color:#660">></span><span styl=
e=3D"color:#000"><br></span><span style=3D"color:#008">void</span><span sty=
le=3D"color:#000"> get_members_from_classes</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><br></span><span style=3D"color:#660">=
}</span><span style=3D"color:#000"><br><br></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"> C</span><span style=3D"color=
:#660">></span><span style=3D"color:#000"><br></span><span style=3D"colo=
r:#008">void</span><span style=3D"color:#000"> get_members_from_parent_<wbr=
>classes</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"><b=
r>=C2=A0 =C2=A0 get_members_from_class</span><span style=3D"color:#660"><=
;</span><span style=3D"color:#000">C</span><span style=3D"color:#660">>(=
);</span><span style=3D"color:#000"><br></span><span style=3D"color:#660">}=
</span></div></code></div></div></div></blockquote><div><br></div><div>No I=
was thinking member pointers could be extended to support base classes:</d=
iv><div><br></div><div>Base Derived::*p =3D &Derived::Base;</div><div><=
br></div><div>I think handling of the members/base classes of the base clas=
s could best be handled by recursion. =C2=A0For example, for operator =3D=
=3D, the =3D=3D for the base class (generic or otherwise) would simply be c=
alled by the generic =3D=3D for the derived class.=C2=A0</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/4612cf90-7ca4-4d4e-9137-b535200a0950%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/4612cf90-7ca4-4d4e-9137-b535200a0950=
%40isocpp.org</a>.<br />
------=_Part_236_1314174077.1457528278857--
------=_Part_235_258947047.1457528278857--
.
Author: Cleiton Santoia <cleitonsantoia@gmail.com>
Date: Wed, 9 Mar 2016 10:29:09 -0800 (PST)
Raw View
------=_Part_6238_708074157.1457548149506
Content-Type: multipart/alternative;
boundary="----=_Part_6239_587998430.1457548149515"
------=_Part_6239_587998430.1457548149515
Content-Type: text/plain; charset=UTF-8
>
> No I was thinking member pointers could be extended to support base
> classes:
>
> Base Derived::*p = &Derived::Base;
>
Since types does not have any storage to be pointed at... I suppose you
mean to build some structure and (at compile time probably) return the
pointer to that structure thru &[typename], so & is your reflective
operator.
So your ideia is basically the p0194r0
<http://open-std.org/JTC1/SC22/WG21/docs/papers/2016/p0194r0.pdf>, but with
instead of using 'reflexpr' as operator, you are using '&' as operator...
My question: how to get the name of a "free" function (&printf) ? class
members of a namespace (&std::experimental) ? or a classes from a module ?
BR
CSS
--
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/b67154e5-36e4-4a8d-b07c-05139d6582ab%40isocpp.org.
------=_Part_6239_587998430.1457548149515
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"l=
tr"><div>No I was thinking member pointers could be extended to support bas=
e classes:</div><div><br></div><div>Base Derived::*p =3D &Derived::Base=
;</div></div></blockquote><div><br></div><div><div>Since types does not hav=
e any storage to be pointed at... I suppose you mean to build some structur=
e and (at compile time probably) return the pointer to that structure thru =
&[typename], so & is your reflective operator.</div></div><div>So y=
our ideia is basically the=C2=A0<a href=3D"http://open-std.org/JTC1/SC22/WG=
21/docs/papers/2016/p0194r0.pdf">p0194r0</a>, but with instead of using =
9;reflexpr' as operator, you are using '&' as operator...<b=
r></div><div><br></div><div>My question: how to get the name of a "fre=
e" function (&printf) ? class members of a namespace (&std::ex=
perimental) ? or a classes from a module ?</div><div><br></div><div>BR</div=
><div>CSS</div><div><br></div><div><br></div><div>=C2=A0<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/b67154e5-36e4-4a8d-b07c-05139d6582ab%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/b67154e5-36e4-4a8d-b07c-05139d6582ab=
%40isocpp.org</a>.<br />
------=_Part_6239_587998430.1457548149515--
------=_Part_6238_708074157.1457548149506--
.
Author: "'Walt Karas' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Wed, 9 Mar 2016 11:13:00 -0800 (PST)
Raw View
------=_Part_643_1680475868.1457550780244
Content-Type: multipart/alternative;
boundary="----=_Part_644_2068264160.1457550780244"
------=_Part_644_2068264160.1457550780244
Content-Type: text/plain; charset=UTF-8
On Wednesday, March 9, 2016 at 1:29:09 PM UTC-5, Cleiton Santoia wrote:
>
> No I was thinking member pointers could be extended to support base
>> classes:
>>
>> Base Derived::*p = &Derived::Base;
>>
>
> Since types does not have any storage to be pointed at... I suppose you
> mean to build some structure and (at compile time probably) return the
> pointer to that structure thru &[typename], so & is your reflective
> operator.
> So your ideia is basically the p0194r0
> <http://www.google.com/url?q=http%3A%2F%2Fopen-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F2016%2Fp0194r0.pdf&sa=D&sntz=1&usg=AFQjCNHbf9XfF-viAIq1hGkw55gs5SrzUQ>,
> but with instead of using 'reflexpr' as operator, you are using '&' as
> operator...
>
> My question: how to get the name of a "free" function (&printf) ? class
> members of a namespace (&std::experimental) ? or a classes from a module ?
>
A hopefully illustrative concrete example:
struct A { int i; };
struct B { int i; };
struct C : public A, public B { };
struct D { int i, j; };
B C::*p1 = &C:::B;
int D::*p2 = &D::j;
p1 and p2 would be initialized with the same numeric value from a machine
language point of view. Typically 4 on a 32-bit architecture.
--
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/1bf9d1c6-5896-426c-bd5f-422b0492800f%40isocpp.org.
------=_Part_644_2068264160.1457550780244
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br>On Wednesday, March 9, 2016 at 1:29:09 PM UTC-5, C=
leiton Santoia wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;m=
argin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=
=3D"ltr"><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>No I=
was thinking member pointers could be extended to support base classes:</d=
iv><div><br></div><div>Base Derived::*p =3D &Derived::Base;</div></div>=
</blockquote><div><br></div><div><div>Since types does not have any storage=
to be pointed at... I suppose you mean to build some structure and (at com=
pile time probably) return the pointer to that structure thru &[typenam=
e], so & is your reflective operator.</div></div><div>So your ideia is =
basically the=C2=A0<a href=3D"http://www.google.com/url?q=3Dhttp%3A%2F%2Fop=
en-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F2016%2Fp0194r0.pdf&sa=
=3DD&sntz=3D1&usg=3DAFQjCNHbf9XfF-viAIq1hGkw55gs5SrzUQ" target=3D"_=
blank" rel=3D"nofollow" onmousedown=3D"this.href=3D'http://www.google.c=
om/url?q\75http%3A%2F%2Fopen-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2=
F2016%2Fp0194r0.pdf\46sa\75D\46sntz\0751\46usg\75AFQjCNHbf9XfF-viAIq1hGkw55=
gs5SrzUQ';return true;" onclick=3D"this.href=3D'http://www.google.c=
om/url?q\75http%3A%2F%2Fopen-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2=
F2016%2Fp0194r0.pdf\46sa\75D\46sntz\0751\46usg\75AFQjCNHbf9XfF-viAIq1hGkw55=
gs5SrzUQ';return true;">p0194r0</a>, but with instead of using 'ref=
lexpr' as operator, you are using '&' as operator...<br></d=
iv><div><br></div><div>My question: how to get the name of a "free&quo=
t; function (&printf) ? class members of a namespace (&std::experim=
ental) ? or a classes from a module ?</div></div></blockquote><div><br>A ho=
pefully illustrative concrete example:<br><br>struct A { int i; };<br><br>s=
truct B { int i; };<br><br>struct C : public A, public B { };<br><br>struct=
D { int i, j; };<br><br>B C::*p1 =3D &C:::B;<br><br>int D::*p2 =3D &am=
p;D::j;<br><br>p1 and p2 would be initialized with the same numeric value f=
rom a machine language point of view.=C2=A0 Typically 4 on a 32-bit archite=
cture.<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/1bf9d1c6-5896-426c-bd5f-422b0492800f%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/1bf9d1c6-5896-426c-bd5f-422b0492800f=
%40isocpp.org</a>.<br />
------=_Part_644_2068264160.1457550780244--
------=_Part_643_1680475868.1457550780244--
.
Author: Cleiton Santoia <cleitonsantoia@gmail.com>
Date: Wed, 9 Mar 2016 12:05:16 -0800 (PST)
Raw View
------=_Part_879_446771668.1457553916309
Content-Type: multipart/alternative;
boundary="----=_Part_880_92916271.1457553916309"
------=_Part_880_92916271.1457553916309
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
>
> A hopefully illustrative concrete example:
>
> struct A { int i; };
> struct B { int i; };
> struct C : public A, public B { };
> struct D { int i, j; };
>
=20
> B C::*p1 =3D &C:::B;
> int D::*p2 =3D &D::j;
>
> p1 and p2 would be initialized with the same numeric value from a machine=
=20
> language point of view. Typically 4 on a 32-bit architecture.
>
The type of p1 is "B member object of C"=20
The type pf p2 is "int member object of D"
p2, I understand, to use it, you must;=20
D d; // instantiate d
d.*p2 =3D 10; // same as D.j =3D 10; i can assign an int here
p1 I don=C2=B4t, you must;=20
C c; // instantiate c
c.*p1 =3D B() // what can i assign here ? a instance of B ?
=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/0519dbd8-89d0-4e71-90af-e4131dffdea4%40isocpp.or=
g.
------=_Part_880_92916271.1457553916309
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"l=
tr"><div>A hopefully illustrative concrete example:<br><br>struct A { int i=
; };<br>struct B { int i; };<br>struct C : public A, public B { };<br>struc=
t D { int i, j; };<br></div></div></blockquote><div>=C2=A0</div><blockquote=
class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1=
px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><div>B C::*p1 =3D &C=
:::B;<br>int D::*p2 =3D &D::j;<br><br>p1 and p2 would be initialized wi=
th the same numeric value from a machine language point of view.=C2=A0 Typi=
cally 4 on a 32-bit architecture.<br></div></div></blockquote><div><br></di=
v><div><br></div><div>The type of p1 is "B member object of C"=C2=
=A0<br></div><div><div>The type pf p2 is "int member object of D"=
</div></div><div><br></div><div>p2, I understand, to use it, you must;=C2=
=A0</div><div><br></div><div>D d; // instantiate d</div><div>d.*p2 =3D 10; =
// same as D.j =3D 10; i can assign an int here</div><div><br></div><div>p1=
I don=C2=B4t, you must;=C2=A0</div><div><br></div><div>C c; // instantiate=
c</div><div>c.*p1 =3D B() =C2=A0// what can i assign here ? a instance of =
B ?</div><div><br></div><div>=C2=A0</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/0519dbd8-89d0-4e71-90af-e4131dffdea4%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/0519dbd8-89d0-4e71-90af-e4131dffdea4=
%40isocpp.org</a>.<br />
------=_Part_880_92916271.1457553916309--
------=_Part_879_446771668.1457553916309--
.
Author: "'Walt Karas' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Wed, 9 Mar 2016 12:45:55 -0800 (PST)
Raw View
------=_Part_6615_255236201.1457556355979
Content-Type: multipart/alternative;
boundary="----=_Part_6616_175938585.1457556355980"
------=_Part_6616_175938585.1457556355980
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
On Wednesday, March 9, 2016 at 3:05:16 PM UTC-5, Cleiton Santoia wrote:
>
> A hopefully illustrative concrete example:
>>
>> struct A { int i; };
>> struct B { int i; };
>> struct C : public A, public B { };
>> struct D { int i, j; };
>>
> =20
>
>> B C::*p1 =3D &C:::B;
>> int D::*p2 =3D &D::j;
>>
>> p1 and p2 would be initialized with the same numeric value from a machin=
e=20
>> language point of view. Typically 4 on a 32-bit architecture.
>>
>
>
> The type of p1 is "B member object of C"=20
> The type pf p2 is "int member object of D"
>
> p2, I understand, to use it, you must;=20
>
> D d; // instantiate d
> d.*p2 =3D 10; // same as D.j =3D 10; i can assign an int here
>
> p1 I don=C2=B4t, you must;=20
>
> C c; // instantiate c
> c.*p1 =3D B() // what can i assign here ? a instance of B ?
>
Yes that would work. This:
c.*p1 =3D B();
(c.*.p1).i =3D 5;
would make the same changes to c as:
static_cast<B &)(c) =3D B();
static_cast<B &>(c).i =3D 5;
--=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/11911c74-3792-4cbf-858b-d8c7aeb8e753%40isocpp.or=
g.
------=_Part_6616_175938585.1457556355980
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br>On Wednesday, March 9, 2016 at 3:05:16 PM UTC-5, C=
leiton Santoia wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;m=
argin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=
=3D"ltr"><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>A ho=
pefully illustrative concrete example:<br><br>struct A { int i; };<br>struc=
t B { int i; };<br>struct C : public A, public B { };<br>struct D { int i, =
j; };<br></div></div></blockquote><div>=C2=A0</div><blockquote class=3D"gma=
il_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;pa=
dding-left:1ex"><div dir=3D"ltr"><div>B C::*p1 =3D &C:::B;<br>int D::*p=
2 =3D &D::j;<br><br>p1 and p2 would be initialized with the same numeri=
c value from a machine language point of view.=C2=A0 Typically 4 on a 32-bi=
t architecture.<br></div></div></blockquote><div><br></div><div><br></div><=
div>The type of p1 is "B member object of C"=C2=A0<br></div><div>=
<div>The type pf p2 is "int member object of D"</div></div><div><=
br></div><div>p2, I understand, to use it, you must;=C2=A0</div><div><br></=
div><div>D d; // instantiate d</div><div>d.*p2 =3D 10; // same as D.j =3D 1=
0; i can assign an int here</div><div><br></div><div>p1 I don=C2=B4t, you m=
ust;=C2=A0</div><div><br></div><div>C c; // instantiate c</div><div>c.*p1 =
=3D B() =C2=A0// what can i assign here ? a instance of B ?</div></div></bl=
ockquote><div><br>Yes that would work.=C2=A0 This:<br><br>c.*p1 =3D B();<br=
>(c.*.p1).i =3D 5;<br><br>would make the same changes to c as:<br><br>stati=
c_cast<B &)(c) =3D B();<br>static_cast<B &>(c).i =3D 5;<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/11911c74-3792-4cbf-858b-d8c7aeb8e753%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/11911c74-3792-4cbf-858b-d8c7aeb8e753=
%40isocpp.org</a>.<br />
------=_Part_6616_175938585.1457556355980--
------=_Part_6615_255236201.1457556355979--
.
Author: "'Walt Karas' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Mon, 2 May 2016 14:38:34 -0700 (PDT)
Raw View
------=_Part_769_1774317915.1462225115022
Content-Type: multipart/alternative;
boundary="----=_Part_770_819221775.1462225115022"
------=_Part_770_819221775.1462225115022
Content-Type: text/plain; charset=UTF-8
I took a stab at trying to implement something along these lines in the
current language:
https://github.com/wkaras/C-plus-plus-library-default-operators
On Saturday, February 27, 2016 at 4:18:34 PM UTC-5, Walt Karas wrote:
>
> A "primitive" template named "Components" with this interface:
>
> template <
> class Target,
> template <typename Member_type, Member_type Target::*mptr>
> class Op,
> typename Param>
> struct Components
> {
> bool operator () (Param & param);
> };
>
> The Op parameter is presumed to fulfill the constraint:
>
> Param & param;
> Op<Member_type, &Target::member> op;
> bool b = op(param);
>
> for all data members and base classes of the class Target. The function
> operator of Components would be generated implicitly. It would instantiate
> Op for each component of Target, create an instance of the instantiated
> class, and call its function operator as shown in the constraint above,
> forwarding to it the parameter 'param'. If the call returned false, the
> function operator of Components would return false immediately. If all the
> calls for components returned true, the Components operator would also
> return true.
>
> For example, for this class:
>
> struct A { int i, j; double x; };
>
> the compiler would implicitly generate the equivalent of the following
> partial specialization of Components:
>
> template <
> template <typename Member_type, Member_type A::*mptr> class Op,
> typename Param>
> struct Components<A, Op, Param>
> {
> bool operator () (Param & param)
> {
> return(
> Op<int, &A::i>()(param) &&
> Op<int, &A::j>()(param) &&
> Op<double, &A::x>()(param));
> }
> };
>
> This would make it possible to define a default operator == as a library
> template:
>
> template <class Target>
> class Equality_op;
>
> template <class Target>
> class Equality_param
> {
> friend class Equality_op<Target>;
>
> const Target &op1, &op2;
>
> public:
> Equality_param(const Target &op1_, const Target &op2_)
> : op1(op1_), op2(op2_) { }
> };
>
> template <class Target>
> struct Equality_op
> {
> template <typename Member_type, Member_type Target::*mptr>
> struct Op
> {
> bool operator () (Equality_param<Target> & param)
> {
> return(param.op1.*mptr == param.op2.*mptr);
> }
> };
> };
>
> template <class Target>
> bool operator == (const Target &op1, const Target &op2)
> {
> Equality_param<Target> param(op1, op2);
>
> Components<
> Target, Equality_op<Target>::template Op, Equality_param<Target> > c;
>
> return(c(param));
> }
>
> Likewise for default operators > and <.
>
> This implies that member pointers can point to base classes, which I'm
> guessing is an idea that's been rejected before. So doing this would
> create "pressure" to accept the syntax:
>
> Base Derived::*p = &Derived::Base;
>
> There would also be a need for another "primitive" template
> Components_no_virt_base that would skip over virtual base classes I think.
>
> A nice thing about this approach is that the default == operator could
> sometimes be "fixed" rather than discarded. For example, suppose the
> default == operator worked for a class "Big" except for one data member
> "argh", which was a pointer to a heap object. One could handle this with
> an overriding instantiation of "Equality_op":
>
> template <>
> struct Equality_op<Big>
> {
> template <>
> struct Op<Argh, &Big::argh>
> {
> bool operator () (Equality_param<Target> & param)
> {
> // ...
> }
> };
> };
>
--
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/77c1b655-f29c-4836-aab9-334d6e77af73%40isocpp.org.
------=_Part_770_819221775.1462225115022
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">I took a stab at trying to implement something along these=
lines in the current language:<br><br>https://github.com/wkaras/C-plus-plu=
s-library-default-operators<br><br>On Saturday, February 27, 2016 at 4:18:3=
4 PM UTC-5, Walt Karas wrote:<blockquote class=3D"gmail_quote" style=3D"mar=
gin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><=
div dir=3D"ltr">A "primitive" template named "Components&quo=
t; with this interface:<br><br>template <<br>=C2=A0 class Target,<br>=C2=
=A0 template <typename Member_type, Member_type Target::*mptr><br>=C2=
=A0=C2=A0=C2=A0 class Op,<br>=C2=A0 typename Param><br>struct Components=
<br>=C2=A0 {<br>=C2=A0=C2=A0=C2=A0 bool operator () (Param & param);<br=
>=C2=A0 };<br><br>The Op parameter is presumed to fulfill the constraint:<b=
r><br>Param & param;<br>Op<Member_type, &Target::member> op; =
<br>bool b =3D op(param);<br><br>for all data members and base classes of t=
he class Target.=C2=A0 The function operator of Components would be generat=
ed implicitly.=C2=A0 It would instantiate Op for each component of Target, =
create an instance of the instantiated class, and call its function operato=
r as shown in the constraint above, forwarding to it the parameter 'par=
am'.=C2=A0 If the call returned false, the function operator of Compone=
nts would return false immediately.=C2=A0 If all the calls for components r=
eturned true, the Components operator would also return true.<br><br>For ex=
ample, for this class:<br><br>struct A { int i, j; double x; };<br><br>the =
compiler would implicitly generate the equivalent of the following partial =
specialization of Components:<br><br>template <<br>=C2=A0 template <t=
ypename Member_type, Member_type A::*mptr> class Op,<br>=C2=A0 typename =
Param><br>struct Components<A, Op, Param><br>=C2=A0 {<br>=C2=A0=C2=
=A0=C2=A0 bool operator () (Param & param)<br>=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 {<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return(<br>=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Op<int, &A::i>()(pa=
ram) &&<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 O=
p<int, &A::j>()(param) &&<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 Op<double, &A::x>()(param));<br>=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 }<br>=C2=A0 };<br><br>This would make it possib=
le to define a default operator =3D=3D as a library template:<br><br>templa=
te <class Target><br>class Equality_op;<br><br>template <class Tar=
get><br>class Equality_param<br>=C2=A0 {<br>=C2=A0=C2=A0=C2=A0 friend cl=
ass Equality_op<Target>;<br><br>=C2=A0=C2=A0=C2=A0 const Target &=
op1, &op2;<br><br>=C2=A0 public:<br>=C2=A0=C2=A0=C2=A0 Equality_param(c=
onst Target &op1_, const Target &op2_)<br>=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 : op1(op1_), op2(op2_) { }<br>=C2=A0 };<br><br>template <class Ta=
rget><br>struct Equality_op<br>=C2=A0 {<br>=C2=A0=C2=A0=C2=A0 template &=
lt;typename Member_type, Member_type Target::*mptr><br>=C2=A0=C2=A0=C2=
=A0 struct Op<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 {<br>=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0 bool operator () (Equality_param<Target> & =
param)<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 {<br>=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return(para=
m.op1.*mptr =3D=3D param.op2.*mptr);<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0 }<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 };<br>=C2=A0 };<b=
r><br>template <class Target><br>bool operator =3D=3D (const Target &=
amp;op1, const Target &op2)<br>=C2=A0 {<br>=C2=A0=C2=A0=C2=A0 Equality_=
param<Target> param(op1, op2);<br><br>=C2=A0=C2=A0=C2=A0 Components&l=
t;<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Target, Equality_op<Target>::tem=
plate Op, Equality_param<Target> > c;<br><br>=C2=A0=C2=A0=C2=A0 re=
turn(c(param));<br>=C2=A0 }<br><br>Likewise for default operators > and =
<.<br><br>This implies that member pointers can point to base classes, w=
hich I'm guessing is an idea that's been rejected before.=C2=A0 So =
doing this would create "pressure" to accept the syntax:<br><br>B=
ase Derived::*p =3D &Derived::Base;<br><br>There would also be a need f=
or another "primitive" template Components_no_virt_base that woul=
d skip over virtual base classes I think.<br><br>A nice thing about this ap=
proach is that the default =3D=3D operator could sometimes be "fixed&q=
uot; rather than discarded.=C2=A0 For example, suppose the default =3D=3D o=
perator worked for a class "Big" except for one data member "=
;argh", which was a pointer to a heap object.=C2=A0 One could handle t=
his with an overriding instantiation of "Equality_op":<br><br>tem=
plate <><br>struct Equality_op<Big><br>=C2=A0 {<br>=C2=A0=C2=A0=
=C2=A0 template <><br>=C2=A0=C2=A0=C2=A0 struct Op<Argh, &Big:=
:argh><br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 {<br>=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0 bool operator () (Equality_param<Target> & par=
am)<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 {<br>=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 // ...<br>=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 }<br>=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0 };<br>=C2=A0 };<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/77c1b655-f29c-4836-aab9-334d6e77af73%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/77c1b655-f29c-4836-aab9-334d6e77af73=
%40isocpp.org</a>.<br />
------=_Part_770_819221775.1462225115022--
------=_Part_769_1774317915.1462225115022--
.