Topic: Do we need a "foreach class component" capability,
Author: "'Walt Karas' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Mon, 2 May 2016 16:50:32 -0700 (PDT)
Raw View
------=_Part_864_1054404559.1462233032438
Content-Type: multipart/alternative;
boundary="----=_Part_865_176755434.1462233032438"
------=_Part_865_176755434.1462233032438
Content-Type: text/plain; charset=UTF-8
I've been playing with some code to "tease out" the underlying "foreach
class component" behavior in the default assignment operator, and use it to
create a "default" equality operator:
https://github.com/wkaras/C-plus-plus-library-default-operators
Obviously, this code is too intrusive and ugly to be a real solution. But
I think it does show that, if we can expose the iteration over components
already present in the default operators (in cleaner way), that allows for
making useful stuff in library land, including comparison operators.
Has there been any discussion of how to get comparison operators from the
reflection proposals, rather than making them primitives?
--
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/796c4723-3a7e-4a76-b0e8-45a7159a9ffa%40isocpp.org.
------=_Part_865_176755434.1462233032438
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">I've been playing with some code to "tease out&qu=
ot; the underlying "foreach class component" behavior in the defa=
ult assignment operator, and use it to create a "default" equalit=
y operator:<br><br>https://github.com/wkaras/C-plus-plus-library-default-op=
erators<br><br>Obviously, this code is too intrusive and ugly to be a real =
solution.=C2=A0 But I think it does show that, if we can expose the iterati=
on over components already present in the default operators (in cleaner way=
), that allows for making useful stuff in library land, including compariso=
n operators.<br><br>Has there been any discussion of how to get comparison =
operators from the reflection proposals, rather than making them primitives=
?<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/796c4723-3a7e-4a76-b0e8-45a7159a9ffa%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/796c4723-3a7e-4a76-b0e8-45a7159a9ffa=
%40isocpp.org</a>.<br />
------=_Part_865_176755434.1462233032438--
------=_Part_864_1054404559.1462233032438--
.