Topic: Anybody interested in reviewing draft/presenting
Author: libbooze@gmail.com
Date: Sat, 16 Feb 2019 13:43:01 -0800 (PST)
Raw View
------=_Part_172_706068155.1550353381493
Content-Type: multipart/alternative;
boundary="----=_Part_173_1592616083.1550353381494"
------=_Part_173_1592616083.1550353381494
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Hi everybody,=20
I do not participate in C++ standardization, but I dislike <=3D> so much th=
at=20
I am considering writing an proposal to stop it.
I know it is futile to try to revert feature this big this late in C++20=20
cycle, it is mostly about doing the right thing=E2=84=A2 even when you have=
zero=20
chance of success. :)
Draft is here=20
<https://docs.google.com/document/d/1VMp3_Dn-bY0ic2tTYjzL26QaTX16s2kwtUYkNW=
Ti9w0/edit?usp=3Dsharing>
..
Feel free to comment objections, requests for clarification... in the=20
document or reply here.
Also since I do not attend C++ standardization meetings if somebody likes=
=20
the draft and is interested in presenting it that would also be great.
regards,=20
Ivan
--=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/544de10d-be39-4c83-a211-b888a34724c3%40isocpp.or=
g.
------=_Part_173_1592616083.1550353381494
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>Hi everybody, <br></div><div><br></div><div>I do not =
participate in
C++ standardization, but I dislike <=3D> so much that I am=20
considering writing an proposal to stop it.<br></div><div>I know it is=20
futile to try to revert feature this big this late in C++20 cycle, it is
mostly about doing the right thing<span class=3D"ILfuVd">=E2=84=A2</span> =
even when you have zero chance of=20
success. :)</div><div><br></div><div>Draft=C2=A0 is <a href=3D"https://docs=
..google.com/document/d/1VMp3_Dn-bY0ic2tTYjzL26QaTX16s2kwtUYkNWTi9w0/edit?us=
p=3Dsharing">here</a>.</div><div><br></div><div>Feel free to comment object=
ions, requests for clarification... in the document or reply here.</div><di=
v>Also
since I do not attend C++ standardization meetings if somebody likes=20
the draft and is interested in presenting it that would also be great.<br><=
/div><div><br></div><div>regards, <br></div><div>Ivan<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/544de10d-be39-4c83-a211-b888a34724c3%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/544de10d-be39-4c83-a211-b888a34724c3=
%40isocpp.org</a>.<br />
------=_Part_173_1592616083.1550353381494--
------=_Part_172_706068155.1550353381493--
.
Author: Andrew Tomazos <andrewtomazos@gmail.com>
Date: Sun, 17 Feb 2019 09:36:47 +1000
Raw View
--00000000000021f8b105820b5e03
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
It isn't too late. It's most likely too late for Kona which is starting
tommorow, but you could submit a paper into the next mailing for Cologne.
If you are not willing to show up to Cologne and defend your paper, you
will need to find a champion to present it. I would start by refining the
paper, submit it into a mailing, and then look for a champion once the
mailing has been posted.
I can help find you one if you can't find one yourself.
On Sun, Feb 17, 2019 at 7:43 AM <libbooze@gmail.com> wrote:
> Hi everybody,
>
> I do not participate in C++ standardization, but I dislike <=3D> so much
> that I am considering writing an proposal to stop it.
> I know it is futile to try to revert feature this big this late in C++20
> cycle, it is mostly about doing the right thing=E2=84=A2 even when you ha=
ve zero
> chance of success. :)
>
> Draft is here
> <https://docs.google.com/document/d/1VMp3_Dn-bY0ic2tTYjzL26QaTX16s2kwtUYk=
NWTi9w0/edit?usp=3Dsharing>
> .
>
> Feel free to comment objections, requests for clarification... in the
> document or reply here.
> Also since I do not attend C++ standardization meetings if somebody likes
> the draft and is interested in presenting it that would also be great.
>
> regards,
> Ivan
>
> --
> 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/544de10d-be3=
9-4c83-a211-b888a34724c3%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/544de10d-be=
39-4c83-a211-b888a34724c3%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er>
> .
>
--=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/CAB%2B4KHJaYsMRKFHPyZvS242p6yQw9UiHJzAxktsy8OO1J=
hqsJQ%40mail.gmail.com.
--00000000000021f8b105820b5e03
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">It isn't too late.=C2=A0 It's most likely too late=
for Kona which is starting tommorow, but you could submit a paper into the=
next mailing for Cologne.<div><br></div><div>If you are not willing to sho=
w up to Cologne and defend your paper, you will need to find a champion to =
present it.=C2=A0 I would start by refining the paper, submit it into a mai=
ling, and then look for a champion once the mailing has been posted.</div><=
div><br></div><div>I can help find you one if you can't find one yourse=
lf.</div><div><br></div><div><br></div></div><br><div class=3D"gmail_quote"=
><div dir=3D"ltr" class=3D"gmail_attr">On Sun, Feb 17, 2019 at 7:43 AM <=
<a href=3D"mailto:libbooze@gmail.com">libbooze@gmail.com</a>> wrote:<br>=
</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;b=
order-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><d=
iv>Hi everybody, <br></div><div><br></div><div>I do not participate in
C++ standardization, but I dislike <=3D> so much that I am=20
considering writing an proposal to stop it.<br></div><div>I know it is=20
futile to try to revert feature this big this late in C++20 cycle, it is
mostly about doing the right thing<span class=3D"gmail-m_-6706891545590676=
524ILfuVd">=E2=84=A2</span> even when you have zero chance of=20
success. :)</div><div><br></div><div>Draft=C2=A0 is <a href=3D"https://docs=
..google.com/document/d/1VMp3_Dn-bY0ic2tTYjzL26QaTX16s2kwtUYkNWTi9w0/edit?us=
p=3Dsharing" target=3D"_blank">here</a>.</div><div><br></div><div>Feel free=
to comment objections, requests for clarification... in the document or re=
ply here.</div><div>Also
since I do not attend C++ standardization meetings if somebody likes=20
the draft and is interested in presenting it that would also be great.<br><=
/div><div><br></div><div>regards, <br></div><div>Ivan<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" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/544de10d-be39-4c83-a211-b888a34724c3%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/544de10d-be39-=
4c83-a211-b888a34724c3%40isocpp.org</a>.<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/CAB%2B4KHJaYsMRKFHPyZvS242p6yQw9UiHJz=
Axktsy8OO1JhqsJQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAB%2B4KHJaYsMR=
KFHPyZvS242p6yQw9UiHJzAxktsy8OO1JhqsJQ%40mail.gmail.com</a>.<br />
--00000000000021f8b105820b5e03--
.
Author: Nicol Bolas <jmckesson@gmail.com>
Date: Sat, 16 Feb 2019 19:04:07 -0800 (PST)
Raw View
------=_Part_215_1292553414.1550372647752
Content-Type: multipart/alternative;
boundary="----=_Part_216_1020690324.1550372647752"
------=_Part_216_1020690324.1550372647752
Content-Type: text/plain; charset="UTF-8"
Your strongest argument was about == and != being potentially faster, and
that has already been changed (ie: EWG approved. I don't believe CWG has
approved wording), pursuant to P1190 and P1185.
I find most of the rest of your arguments to be specious and highly
opinionated with little factual basis behind them. I was particularly
amused by your argument that the "average C++ developer" cannot be expected
to be able to learn about anything within the standard library's namespace.
I'm pretty sure C++ programmers are smart enough at a minimum to learn by
route (ie: include file X and the words Y can be used to mean Z).
Also, performance is not really the reason for `<=>`; it's convenience,
consistency, and ease of use without *sacrificing* performance. So the fact
that nobody can prove that `<=>` is undeniably faster in some case not
really relevant. So long as it isn't *slower*, it's a net-gain.
Oh, and as for real code that is more readable with `<=>` than without it,
just look at any implementation of `std::optional`.
Lastly, a typo: you cite a section of P0893, but the section you meant to
cite is 5.1.3, not 5.3.1.
--
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/3341e330-37e8-4a08-87cb-06f92ea6025a%40isocpp.org.
------=_Part_216_1020690324.1550372647752
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>Your strongest argument was about =3D=3D and !=3D bei=
ng potentially faster, and that has already been changed (ie: EWG approved.=
I don't believe CWG has approved wording), pursuant to P1190 and P1185=
..</div><div><br></div><div>I find most of the rest of your arguments to be =
specious and highly opinionated with little factual basis behind them. I wa=
s particularly amused by your argument that the "average C++ developer=
" cannot be expected to be able to learn about anything within the sta=
ndard library's namespace. I'm pretty sure C++ programmers are smar=
t enough at a minimum to learn by route (ie: include file X and the words Y=
can be used to mean Z).</div><div><br></div><div>Also, performance is not =
really the reason for `<=3D>`; it's convenience, consistency, and=
ease of use without <i>sacrificing</i> performance. So the fact that nobod=
y can prove that `<=3D>` is undeniably faster in some case not really=
relevant. So long as it isn't <i>slower</i>, it's a net-gain.<br><=
/div><div><br></div><div>Oh, and as for real code that is more readable wit=
h `<=3D>` than without it, just look at any implementation of `std::o=
ptional`.</div><div><br></div><div>Lastly, a typo: you cite a section of P0=
893, but the section you meant to cite is 5.1.3, not 5.3.1.<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/3341e330-37e8-4a08-87cb-06f92ea6025a%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/3341e330-37e8-4a08-87cb-06f92ea6025a=
%40isocpp.org</a>.<br />
------=_Part_216_1020690324.1550372647752--
------=_Part_215_1292553414.1550372647752--
.
Author: Arthur O'Dwyer <arthur.j.odwyer@gmail.com>
Date: Sun, 17 Feb 2019 14:55:56 -0800 (PST)
Raw View
------=_Part_375_1390137995.1550444156841
Content-Type: multipart/alternative;
boundary="----=_Part_376_1381636866.1550444156841"
------=_Part_376_1381636866.1550444156841
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On Saturday, February 16, 2019 at 10:04:08 PM UTC-5, Nicol Bolas wrote:
>
> [...]
> Oh, and as for real code that is more readable with `<=3D>` than without =
it,=20
> just look at any implementation of `std::optional`.
>
Barry Revzin's D1189 shows this code for optional::operator<=3D>. Of course=
=20
D1189 does not propose to remove any of the six existing relational=20
operators from `optional` because that would be a breaking change, but we=
=20
can ignore that for our purposes. Let's just say that we're writing a=20
hypothetical `optional`-alike library, and this would be the only operator=
=20
we needed.
template <typename T>class optional {
=20
template <ThreeWayComparableWith<T> U>
compare_3way_type_t<T,U> operator<=3D>(optional<U> const& rhs) const;
{
if (has_value() && rhs.has_value()) {
return **this <=3D> *rhs;
} else {
return has_value() <=3D> rhs.has_value();
}
}
};
Whereas, a real live example of `optional::operator>=3D` from libc++ looks=
=20
like this:
https://github.com/Quuxplusone/libcxx/blob/7c3769df/include/optional#L1101-=
L1115
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() >=3D
_VSTD::declval<const _Up&>()), bool>,
bool
>
operator>=3D(const optional<_Tp>& __x, const optional<_Up>& __y)
{
if (!static_cast<bool>(__y))
return true;
if (!static_cast<bool>(__x))
return false;
return *__x >=3D *__y;
}
So we're talking about the difference between
auto operator<=3D>(const optional& o) const { return (has_value() &&=20
o.has_value()) ? (**this <=3D> *o) : (has_value() <=3D> o.has_value()); }
and
auto operator<(const optional& o) const { return has_value() ?=20
(o.has_value() ? (**this < *o) : false) : o.has_value(); }
auto operator<=3D(const optional& o) const { return !(o < *this); }
auto operator>(const optional& o) const { return (o < *this); }
auto operator>=3D(const optional& o) const { return !(*this < o); }
auto operator=3D=3D(const optional& o) const { return has_value() ?=20
(o.has_value() && **this =3D=3D *o) : !o.has_value(); }
auto operator!=3D(const optional& o) const { return !(**this =3D=3D *o)=
; }
The former one-liner assumes that `T` supports operator<=3D>. The latter=20
six-liner assumes that `T`'s relational operators all have the mathematical=
=20
relationships we naturally assume they should, such as that (x<y) iff=20
(y>x). The actual STL version of std::optional doesn't assume either of=20
these things, which is why D1189 can't propose to *replace *the six-liner=
=20
with the one-liner, and why libc++'s code has to be so fiddly.
See
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1186r0.html#doesnt=
-quite-work-in-non-generic-code
for more details on why right now users will never be able to use the <=3D>=
=20
operator in their actual code.
I think there is a proposal in flight to fix this by making `a <=3D> b`=20
magically rewrite itself into `(a < b) ? less : (a > b) : greater : equal`,=
=20
or something like that, if there is no viable operator<=3D> in scope; but I=
=20
couldn't find that proposal in a quick search.
=E2=80=93Arthur
--=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/cbecbf4b-488e-4dd6-9d81-5bd8485dc2dc%40isocpp.or=
g.
------=_Part_376_1381636866.1550444156841
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On Saturday, February 16, 2019 at 10:04:08 PM UTC-5, Nicol=
Bolas wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-le=
ft: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">=
<div>[...]</div><div>Oh, and as for real code that is more readable with `&=
lt;=3D>` than without it, just look at any implementation of `std::optio=
nal`.</div></div></blockquote><div><br></div><div>Barry Revzin's D1189 =
shows this code for optional::operator<=3D>. Of course D1189 does not=
propose to remove any of the six existing relational operators from `optio=
nal` because that would be a breaking change, but we can ignore that for ou=
r purposes. Let's just say that we're writing a hypothetical `optio=
nal`-alike library, and this would be the only operator we needed.</div><di=
v><br></div><div><pre style=3D"font-size: 0.9em; line-height: 1.45em; max-w=
idth: 100%; caret-color: rgb(27, 27, 27); color: rgb(27, 27, 27);"><code st=
yle=3D"max-width: 100%;"><span style=3D"max-width: 100%;">template</span> <=
span style=3D"max-width: 100%;"><</span><span style=3D"max-width: 100%;"=
>typename</span> T<span style=3D"max-width: 100%;">></span>
<span style=3D"max-width: 100%;">class</span> <span style=3D"max-width: 100=
%;">optional</span> <span style=3D"max-width: 100%;">{</span>
=20
<span style=3D"max-width: 100%;">template</span> <span style=3D"max-wid=
th: 100%;"><</span>ThreeWayComparableWith<span style=3D"max-width: 100%;=
"><</span>T<span style=3D"max-width: 100%;">></span> U<span style=3D"=
max-width: 100%;">></span>
compare_3way_type_t<span style=3D"max-width: 100%;"><</span>T<span s=
tyle=3D"max-width: 100%;">,</span>U<span style=3D"max-width: 100%;">></s=
pan> <span style=3D"max-width: 100%;">operator</span><span style=3D"max-wid=
th: 100%;"><=3D</span><span style=3D"max-width: 100%;">></span><span =
style=3D"max-width: 100%;">(</span>optional<span style=3D"max-width: 100%;"=
><</span>U<span style=3D"max-width: 100%;">></span> <span style=3D"ma=
x-width: 100%;">const</span><span style=3D"max-width: 100%;">&</span> r=
hs<span style=3D"max-width: 100%;">)</span> <span style=3D"max-width: 100%;=
">const</span><span style=3D"max-width: 100%;">;</span>
<span style=3D"max-width: 100%;">{</span>
<span style=3D"max-width: 100%;">if</span> <span style=3D"max-width=
: 100%;">(</span><span style=3D"max-width: 100%;">has_value</span><span sty=
le=3D"max-width: 100%;">(</span><span style=3D"max-width: 100%;">)</span> <=
span style=3D"max-width: 100%;">&&</span> rhs<span style=3D"max-wid=
th: 100%;">.</span><span style=3D"max-width: 100%;">has_value</span><span s=
tyle=3D"max-width: 100%;">(</span><span style=3D"max-width: 100%;">)</span>=
<span style=3D"max-width: 100%;">)</span> <span style=3D"max-width: 100%;">=
{</span>
<span style=3D"max-width: 100%;">return</span> <span style=3D"m=
ax-width: 100%;">*</span><span style=3D"max-width: 100%;">*</span><span sty=
le=3D"max-width: 100%;">this</span> <span style=3D"max-width: 100%;"><=
=3D</span><span style=3D"max-width: 100%;">></span> <span style=3D"max-w=
idth: 100%;">*</span>rhs<span style=3D"max-width: 100%;">;</span>
<span style=3D"max-width: 100%;">}</span> <span style=3D"max-width:=
100%;">else</span> <span style=3D"max-width: 100%;">{</span>
<span style=3D"max-width: 100%;">return</span> <span style=3D"m=
ax-width: 100%;">has_value</span><span style=3D"max-width: 100%;">(</span><=
span style=3D"max-width: 100%;">)</span> <span style=3D"max-width: 100%;">&=
lt;=3D</span><span style=3D"max-width: 100%;">></span> rhs<span style=3D=
"max-width: 100%;">.</span><span style=3D"max-width: 100%;">has_value</span=
><span style=3D"max-width: 100%;">(</span><span style=3D"max-width: 100%;">=
)</span><span style=3D"max-width: 100%;">;</span>
<span style=3D"max-width: 100%;">}</span>
<span style=3D"max-width: 100%;">}</span>
=20
<span style=3D"max-width: 100%;">}</span><span style=3D"max-width: 100%;">;=
</span></code></pre></div><div><br></div><div>Whereas, a real live example =
of `optional::operator>=3D` from libc++ looks like this:</div><div><a hr=
ef=3D"https://github.com/Quuxplusone/libcxx/blob/7c3769df/include/optional#=
L1101-L1115">https://github.com/Quuxplusone/libcxx/blob/7c3769df/include/op=
tional#L1101-L1115</a><br></div><br><font face=3D"courier new, monospace">t=
emplate <class _Tp, class _Up><br> _LIBCPP_INLINE_VISIBILITY constexp=
r<br> enable_if_t<<br>=C2=A0 =C2=A0 is_convertible_v<decltype(_VSTD::=
declval<const _Tp&>() >=3D<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 _VST=
D::declval<const _Up&>()), bool>,<br>=C2=A0 =C2=A0 bool<br> &g=
t;<br> operator>=3D(const optional<_Tp>& __x, const optional&l=
t;_Up>& __y)<br> {<br>=C2=A0 =C2=A0 if (!static_cast<bool>(__y=
))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 return true;<br>=C2=A0 =C2=A0 if (!static=
_cast<bool>(__x))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 return false;<br>=C2=
=A0 =C2=A0 return *__x >=3D *__y;<br> }<br></font><br>So we're talki=
ng about the difference between<div><br></div><div>=C2=A0 =C2=A0 auto opera=
tor<=3D>(const optional& o) const { return (has_value() &&=
; o.has_value()) ? (**this <=3D> *o) : (has_value() <=3D> o.has=
_value()); }</div><div><br></div><div>and</div><div><br></div><div><div>=C2=
=A0 =C2=A0 auto operator<(const optional& o) const { return has_valu=
e() ? (o.has_value() ? (**this < *o) : false) : o.has_value(); }</div><d=
iv><div>=C2=A0 =C2=A0 auto operator<=3D(const optional& o) const { r=
eturn !(o < *this); }</div><div><div>=C2=A0 =C2=A0 auto operator>(con=
st optional& o) const { return (o < *this); }</div></div></div></div=
><div><div><div>=C2=A0 =C2=A0 auto operator>=3D(const optional& o) c=
onst { return !(*this < o); }</div></div></div><div><div><div>=C2=A0 =C2=
=A0 auto operator=3D=3D(const optional& o) const { return has_value() ?=
(o.has_value() && **this =3D=3D *o) : !o.has_value(); }</div></div=
></div><div><div>=C2=A0 =C2=A0 auto operator!=3D(const optional& o) con=
st { return !(**this =3D=3D *o); }</div></div><div><br></div><div>The forme=
r one-liner assumes that `T` supports operator<=3D>. The latter six-l=
iner assumes that `T`'s relational operators all have the mathematical =
relationships we naturally assume they should, such as that (x<y) iff (y=
>x). The actual STL version of std::optional doesn't assume either o=
f these things, which is why D1189 can't propose to <i>replace </i>the =
six-liner with the one-liner, and why libc++'s code has to be so fiddly=
..</div><div><div><br></div><div>See</div><div><a href=3D"http://www.open-st=
d.org/jtc1/sc22/wg21/docs/papers/2018/p1186r0.html#doesnt-quite-work-in-non=
-generic-code">http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p118=
6r0.html#doesnt-quite-work-in-non-generic-code</a><br></div><div>for more d=
etails on why right now users will never be able to use the <=3D> ope=
rator in their actual code.</div><div>I think there is a proposal in flight=
to fix this by making `a <=3D> b` magically rewrite itself into `(a =
< b) ? less : (a > b) : greater : equal`, or something like that, if =
there is no viable operator<=3D> in scope; but I couldn't find th=
at proposal in a quick search.</div><div><br></div><div>=E2=80=93Arthur</di=
v><div></div></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"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/cbecbf4b-488e-4dd6-9d81-5bd8485dc2dc%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/cbecbf4b-488e-4dd6-9d81-5bd8485dc2dc=
%40isocpp.org</a>.<br />
------=_Part_376_1381636866.1550444156841--
------=_Part_375_1390137995.1550444156841--
.
Author: Gaetano Checinski <gaetano.checinski@gmail.com>
Date: Mon, 18 Feb 2019 15:02:18 +0000
Raw View
--000000000000dcf7c705822c69cd
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Personally I don't think we really need `<=3D>` as it can easily simulated
with some TypeClass based Meta Programming.
In fact, I believe it's a technique that is underused in the C++ community.
Here an example of this approach: https://godbolt.org/z/2IIXlh
Maybe we should standardize a set of Type-Classes and Customization Points
instead?
I'm happy to elaborate.
[image: Mailtrack]
<https://mailtrack.io?utm_source=3Dgmail&utm_medium=3Dsignature&utm_campaig=
n=3Dsignaturevirality5&>
Sender
notified by
Mailtrack
<https://mailtrack.io?utm_source=3Dgmail&utm_medium=3Dsignature&utm_campaig=
n=3Dsignaturevirality5&>
02/18/19,
2:58:57 PM
On Sat, 16 Feb 2019 at 21:43, <libbooze@gmail.com> wrote:
> Hi everybody,
>
> I do not participate in C++ standardization, but I dislike <=3D> so much
> that I am considering writing an proposal to stop it.
> I know it is futile to try to revert feature this big this late in C++20
> cycle, it is mostly about doing the right thing=E2=84=A2 even when you ha=
ve zero
> chance of success. :)
>
> Draft is here
> <https://docs.google.com/document/d/1VMp3_Dn-bY0ic2tTYjzL26QaTX16s2kwtUYk=
NWTi9w0/edit?usp=3Dsharing>
> .
>
> Feel free to comment objections, requests for clarification... in the
> document or reply here.
> Also since I do not attend C++ standardization meetings if somebody likes
> the draft and is interested in presenting it that would also be great.
>
> regards,
> Ivan
>
> --
> 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/544de10d-be3=
9-4c83-a211-b888a34724c3%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/544de10d-be=
39-4c83-a211-b888a34724c3%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er>
> .
>
--=20
Regards,
Gaetano Checinski
Founder of Loopperfect
https://loopperfect.com
https://buckaroo.pm
--=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/CAN0NuG5ao9MVQ3wQEgsA%2B52Rucz704Pi-PyK707_npxeo=
MtXgg%40mail.gmail.com.
--000000000000dcf7c705822c69cd
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><img width=3D"0" height=3D"0" class=3D"mailtrack-img" alt=
=3D"" style=3D"display:flex" src=3D"https://mailtrack.io/trace/mail/5e95ad2=
902d03e056748aa694ec8198020d8d32e.png?u=3D931501"><div dir=3D"ltr"><div>Per=
sonally I don't think we really need `<=3D>` as it can easily sim=
ulated with some TypeClass based Meta Programming.</div><div>In fact, I bel=
ieve it's a technique that is underused in the C++ community.<br><br>He=
re an example of this approach: <a href=3D"https://godbolt.org/z/2IIXlh">ht=
tps://godbolt.org/z/2IIXlh</a><br><br>Maybe we should standardize a set of =
Type-Classes and Customization Points instead?<br><br>I'm happy to elab=
orate.</div></div><br><div class=3D"mt-signature">
<table border=3D"0" cellpadding=3D"8" cellspacing=3D"0" style=3D"us=
er-select: none;">
<tbody><tr>
<td>
<a href=3D"https://mailtrack.io?utm_source=3Dgmail&=
utm_medium=3Dsignature&utm_campaign=3Dsignaturevirality5&" class=3D=
"" style=3D"text-decoration:none">
<img src=3D"https://s3.amazonaws.com/mailtrack-sign=
ature/sender_notified.gif" alt=3D"Mailtrack" class=3D"" width=3D"32" height=
=3D"32">
</a>
</td>
<td>
<span style=3D"color:#777">Sender notified by</span> <b=
r>
<a href=3D"https://mailtrack.io?utm_source=3Dgmail&=
utm_medium=3Dsignature&utm_campaign=3Dsignaturevirality5&" class=3D=
"mt-install" style=3D"color:#4374f7">Mailtrack</a>
<span style=3D"color:transparent;font-size:0">02/18/19,=
2:58:57 PM</span>
</td>
<td>
=20
</td>
</tr>
</tbody></table>
</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gm=
ail_attr">On Sat, 16 Feb 2019 at 21:43, <<a href=3D"mailto:libbooze@gmai=
l.com">libbooze@gmail.com</a>> wrote:<br></div><blockquote class=3D"gmai=
l_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,20=
4,204);padding-left:1ex"><div dir=3D"ltr"><div>Hi everybody, <br></div><div=
><br></div><div>I do not participate in
C++ standardization, but I dislike <=3D> so much that I am=20
considering writing an proposal to stop it.<br></div><div>I know it is=20
futile to try to revert feature this big this late in C++20 cycle, it is
mostly about doing the right thing<span class=3D"gmail-m_-6515429186863171=
731ILfuVd">=E2=84=A2</span> even when you have zero chance of=20
success. :)</div><div><br></div><div>Draft=C2=A0 is <a href=3D"https://docs=
..google.com/document/d/1VMp3_Dn-bY0ic2tTYjzL26QaTX16s2kwtUYkNWTi9w0/edit?us=
p=3Dsharing" target=3D"_blank">here</a>.</div><div><br></div><div>Feel free=
to comment objections, requests for clarification... in the document or re=
ply here.</div><div>Also
since I do not attend C++ standardization meetings if somebody likes=20
the draft and is interested in presenting it that would also be great.<br><=
/div><div><br></div><div>regards, <br></div><div>Ivan<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" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/544de10d-be39-4c83-a211-b888a34724c3%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/544de10d-be39-=
4c83-a211-b888a34724c3%40isocpp.org</a>.<br>
</blockquote></div><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr"=
class=3D"gmail_signature"><div dir=3D"ltr"><div><div dir=3D"ltr"><span sty=
le=3D"font-size:12.8px">Regards,</span><div style=3D"font-size:12.8px"><br>=
</div><div style=3D"font-size:12.8px">Gaetano Checinski</div><div style=3D"=
font-size:12.8px"><span style=3D"font-size:12.8px">Founder of Loopperfect</=
span><br></div><div style=3D"font-size:12.8px"><span style=3D"font-size:12.=
8px"><a href=3D"https://loopperfect.com" target=3D"_blank">https://loopperf=
ect.com</a></span></div><div style=3D"font-size:12.8px"><span style=3D"font=
-size:12.8px"><a href=3D"https://buckaroo.pm" target=3D"_blank">https://buc=
karoo.pm</a></span></div></div></div></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"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/CAN0NuG5ao9MVQ3wQEgsA%2B52Rucz704Pi-P=
yK707_npxeoMtXgg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAN0NuG5ao9MVQ3=
wQEgsA%2B52Rucz704Pi-PyK707_npxeoMtXgg%40mail.gmail.com</a>.<br />
--000000000000dcf7c705822c69cd--
.
Author: =?UTF-8?B?R2HFoXBlciBBxb5tYW4=?= <gasper.azman@gmail.com>
Date: Mon, 18 Feb 2019 16:08:17 +0000
Raw View
--000000000000d26a9005822d553a
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
I disagree. Synthesizing <=3D> from the class members will only be possible
after reflection *and* generation are in the language, and rewriting x < y
into (x <=3D> ) < 0 will never be possible without a function call. The
language does that really quickly and automatically now.
<=3D> is *way* more ergonomic for rule-of-zero stuff than any metaprogrammi=
ng
can do ATM. <=3D> does a really important thing. I don't agree we should ta=
ke
it out. Barry's proposals fix it to correctness. And yes, I've read (and
discussed with Barry and Jeff) all of them.
On Mon, Feb 18, 2019 at 3:02 PM Gaetano Checinski <
gaetano.checinski@gmail.com> wrote:
> Personally I don't think we really need `<=3D>` as it can easily simulate=
d
> with some TypeClass based Meta Programming.
> In fact, I believe it's a technique that is underused in the C++ communit=
y.
>
> Here an example of this approach: https://godbolt.org/z/2IIXlh
>
> Maybe we should standardize a set of Type-Classes and Customization Point=
s
> instead?
>
> I'm happy to elaborate.
>
> [image: Mailtrack]
> <https://mailtrack.io?utm_source=3Dgmail&utm_medium=3Dsignature&utm_campa=
ign=3Dsignaturevirality5&> Sender
> notified by
> Mailtrack
> <https://mailtrack.io?utm_source=3Dgmail&utm_medium=3Dsignature&utm_campa=
ign=3Dsignaturevirality5&> 02/18/19,
> 2:58:57 PM
>
> On Sat, 16 Feb 2019 at 21:43, <libbooze@gmail.com> wrote:
>
>> Hi everybody,
>>
>> I do not participate in C++ standardization, but I dislike <=3D> so much
>> that I am considering writing an proposal to stop it.
>> I know it is futile to try to revert feature this big this late in C++20
>> cycle, it is mostly about doing the right thing=E2=84=A2 even when you h=
ave zero
>> chance of success. :)
>>
>> Draft is here
>> <https://docs.google.com/document/d/1VMp3_Dn-bY0ic2tTYjzL26QaTX16s2kwtUY=
kNWTi9w0/edit?usp=3Dsharing>
>> .
>>
>> Feel free to comment objections, requests for clarification... in the
>> document or reply here.
>> Also since I do not attend C++ standardization meetings if somebody like=
s
>> the draft and is interested in presenting it that would also be great.
>>
>> regards,
>> Ivan
>>
>> --
>> You received this message because you are subscribed to the Google Group=
s
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n
>> 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/544de10d-be=
39-4c83-a211-b888a34724c3%40isocpp.org
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/544de10d-b=
e39-4c83-a211-b888a34724c3%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoo=
ter>
>> .
>>
>
>
> --
> Regards,
>
> Gaetano Checinski
> Founder of Loopperfect
> https://loopperfect.com
> https://buckaroo.pm
>
> --
> 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/CAN0NuG5ao9M=
VQ3wQEgsA%2B52Rucz704Pi-PyK707_npxeoMtXgg%40mail.gmail.com
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAN0NuG5ao9=
MVQ3wQEgsA%2B52Rucz704Pi-PyK707_npxeoMtXgg%40mail.gmail.com?utm_medium=3Dem=
ail&utm_source=3Dfooter>
> .
>
--=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/CAANG%3DkV47rTCykTNma2KA4NhY9X2jAN5PciFgKFOeSvwK=
bGr0g%40mail.gmail.com.
--000000000000d26a9005822d553a
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">I disagree. Synthesizing <=3D> from the class member=
s will only be possible after reflection *and* generation are in the langua=
ge, and rewriting x < y into (x <=3D> ) < 0 will never be possi=
ble without a function call. The language does that really quickly and auto=
matically now.<div><br></div><div><=3D> is *way* more ergonomic for r=
ule-of-zero stuff than any metaprogramming can do ATM. <=3D> does a r=
eally important thing. I don't agree we should take it out. Barry's=
proposals fix it to correctness. And yes, I've read (and discussed wit=
h Barry and Jeff) all of them.</div></div><br><div class=3D"gmail_quote"><d=
iv dir=3D"ltr" class=3D"gmail_attr">On Mon, Feb 18, 2019 at 3:02 PM Gaetano=
Checinski <<a href=3D"mailto:gaetano.checinski@gmail.com">gaetano.checi=
nski@gmail.com</a>> wrote:<br></div><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padd=
ing-left:1ex"><div dir=3D"ltr"><img width=3D"0" height=3D"0" class=3D"gmail=
-m_-8341736279620140617mailtrack-img" alt=3D"" style=3D"display: flex;" src=
=3D"https://mailtrack.io/trace/mail/5e95ad2902d03e056748aa694ec8198020d8d32=
e.png?u=3D931501"><div dir=3D"ltr"><div>Personally I don't think we rea=
lly need `<=3D>` as it can easily simulated with some TypeClass based=
Meta Programming.</div><div>In fact, I believe it's a technique that i=
s underused in the C++ community.<br><br>Here an example of this approach: =
<a href=3D"https://godbolt.org/z/2IIXlh" target=3D"_blank">https://godbolt.=
org/z/2IIXlh</a><br><br>Maybe we should standardize a set of Type-Classes a=
nd Customization Points instead?<br><br>I'm happy to elaborate.</div></=
div><br><div class=3D"gmail-m_-8341736279620140617mt-signature">
<table border=3D"0" cellpadding=3D"8" cellspacing=3D"0">
<tbody><tr>
<td>
<a href=3D"https://mailtrack.io?utm_source=3Dgmail&=
utm_medium=3Dsignature&utm_campaign=3Dsignaturevirality5&" style=3D=
"text-decoration:none" target=3D"_blank">
<img src=3D"https://s3.amazonaws.com/mailtrack-sign=
ature/sender_notified.gif" alt=3D"Mailtrack" width=3D"32" height=3D"32">
</a>
</td>
<td>
<span style=3D"color:rgb(119,119,119)">Sender notified =
by</span> <br>
<a href=3D"https://mailtrack.io?utm_source=3Dgmail&=
utm_medium=3Dsignature&utm_campaign=3Dsignaturevirality5&" class=3D=
"gmail-m_-8341736279620140617mt-install" style=3D"color:rgb(67,116,247)" ta=
rget=3D"_blank">Mailtrack</a>
<span style=3D"color:transparent;font-size:0px">02/18/1=
9, 2:58:57 PM</span>
</td>
<td>
=20
</td>
</tr>
</tbody></table>
</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gm=
ail_attr">On Sat, 16 Feb 2019 at 21:43, <<a href=3D"mailto:libbooze@gmai=
l.com" target=3D"_blank">libbooze@gmail.com</a>> wrote:<br></div><blockq=
uote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1p=
x solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div>Hi everybo=
dy, <br></div><div><br></div><div>I do not participate in
C++ standardization, but I dislike <=3D> so much that I am=20
considering writing an proposal to stop it.<br></div><div>I know it is=20
futile to try to revert feature this big this late in C++20 cycle, it is
mostly about doing the right thing<span class=3D"gmail-m_-8341736279620140=
617gmail-m_-6515429186863171731ILfuVd">=E2=84=A2</span> even when you have =
zero chance of=20
success. :)</div><div><br></div><div>Draft=C2=A0 is <a href=3D"https://docs=
..google.com/document/d/1VMp3_Dn-bY0ic2tTYjzL26QaTX16s2kwtUYkNWTi9w0/edit?us=
p=3Dsharing" target=3D"_blank">here</a>.</div><div><br></div><div>Feel free=
to comment objections, requests for clarification... in the document or re=
ply here.</div><div>Also
since I do not attend C++ standardization meetings if somebody likes=20
the draft and is interested in presenting it that would also be great.<br><=
/div><div><br></div><div>regards, <br></div><div>Ivan<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" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/544de10d-be39-4c83-a211-b888a34724c3%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/544de10d-be39-=
4c83-a211-b888a34724c3%40isocpp.org</a>.<br>
</blockquote></div><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr"=
class=3D"gmail-m_-8341736279620140617gmail_signature"><div dir=3D"ltr"><di=
v><div dir=3D"ltr"><span style=3D"font-size:12.8px">Regards,</span><div sty=
le=3D"font-size:12.8px"><br></div><div style=3D"font-size:12.8px">Gaetano C=
hecinski</div><div style=3D"font-size:12.8px"><span style=3D"font-size:12.8=
px">Founder of Loopperfect</span><br></div><div style=3D"font-size:12.8px">=
<span style=3D"font-size:12.8px"><a href=3D"https://loopperfect.com" target=
=3D"_blank">https://loopperfect.com</a></span></div><div style=3D"font-size=
:12.8px"><span style=3D"font-size:12.8px"><a href=3D"https://buckaroo.pm" t=
arget=3D"_blank">https://buckaroo.pm</a></span></div></div></div></div></di=
v>
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAN0NuG5ao9MVQ3wQEgsA%2B52Rucz704Pi-P=
yK707_npxeoMtXgg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoote=
r" target=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-pro=
posals/CAN0NuG5ao9MVQ3wQEgsA%2B52Rucz704Pi-PyK707_npxeoMtXgg%40mail.gmail.c=
om</a>.<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/CAANG%3DkV47rTCykTNma2KA4NhY9X2jAN5Pc=
iFgKFOeSvwKbGr0g%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAANG%3DkV47rTC=
ykTNma2KA4NhY9X2jAN5PciFgKFOeSvwKbGr0g%40mail.gmail.com</a>.<br />
--000000000000d26a9005822d553a--
.
Author: Nicol Bolas <jmckesson@gmail.com>
Date: Mon, 18 Feb 2019 08:09:25 -0800 (PST)
Raw View
------=_Part_667_1813401308.1550506165743
Content-Type: multipart/alternative;
boundary="----=_Part_668_723417091.1550506165744"
------=_Part_668_723417091.1550506165744
Content-Type: text/plain; charset="UTF-8"
On Monday, February 18, 2019 at 10:02:32 AM UTC-5, Gaetano Checinski wrote:
>
> Personally I don't think we really need `<=>` as it can easily simulated
> with some TypeClass based Meta Programming.
> In fact, I believe it's a technique that is underused in the C++ community.
>
> Here an example of this approach: https://godbolt.org/z/2IIXlh
>
> Maybe we should standardize a set of Type-Classes and Customization Points
> instead?
>
That doesn't actually solve everything that `<=>` does. It doesn't solve
generating comparison operations (that would require reflection, which is
still a long way off). It certainly doesn't solve the literal types as
non-type template parameter thing.
I'm also not sure how this would interact in a modular world. Ideally, all
I should have to export from your example is the `Custom` class and
`CustomTrait`. But since the latter is actually a specialization of a
template that exists in a completely different namespace and module, I
*also* have to export the trait from the standard library module. And I
would probably have to export the `operator` overloads based on that trait.
Or just have my module export the entire standard library module containing
`CustomTrait`... which is kind of the opposite of how modules are supposed
to work.
Overall, I don't know why we should prefer a half-measure library solution
like this to a proper language solution. *Especially* when the language
solution has already been approved by CWG. You're basically advocating
removing something from the WP in order to replace it with a weaker version
of itself.
--
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/ff4a00b8-cc13-40e6-8d13-43b1db40d5c3%40isocpp.org.
------=_Part_668_723417091.1550506165744
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On Monday, February 18, 2019 at 10:02:32 AM UTC-5, Gaetano=
Checinski wrote:<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"><img alt=3D"" style=3D"display:flex" src=3D"https://lh3.googleuserconte=
nt.com/proxy/1NYLMFf_lkv9J21NmMzN5CyhxeVUUECHlsA_3DuFbxCBIp8yHWEWffHQqAZDh6=
3d7OfULR3Bt5ZoTpPKQA51IUxPx4KjXNS6j8dvw46T-wutotny7V5Gco8sDnxPFS7vGXtnVpjhN=
i0=3Dw5000-h5000" width=3D"0" height=3D"0"><div dir=3D"ltr"><div>Personally=
I don't think we really need `<=3D>` as it can easily simulated =
with some TypeClass based Meta Programming.</div><div>In fact, I believe it=
's a technique that is underused in the C++ community.<br><br>Here an e=
xample of this approach: <a href=3D"https://godbolt.org/z/2IIXlh" target=3D=
"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D'https://www.googl=
e.com/url?q\x3dhttps%3A%2F%2Fgodbolt.org%2Fz%2F2IIXlh\x26sa\x3dD\x26sntz\x3=
d1\x26usg\x3dAFQjCNHmibxDG-WZL5LdmiBoOzJUcZaj_Q';return true;" onclick=
=3D"this.href=3D'https://www.google.com/url?q\x3dhttps%3A%2F%2Fgodbolt.=
org%2Fz%2F2IIXlh\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHmibxDG-WZL5LdmiBo=
OzJUcZaj_Q';return true;">https://godbolt.org/z/2IIXlh</a><br><br>Maybe=
we should standardize a set of Type-Classes and Customization Points inste=
ad?<br></div></div></div></blockquote><div><br></div><div>That doesn't =
actually solve everything that `<=3D>` does. It doesn't solve gen=
erating comparison operations (that would require reflection, which is stil=
l a long way off). It certainly doesn't solve the literal types as non-=
type template parameter thing.<br></div><div><br></div><div>I'm also no=
t sure how this would interact in a modular world. Ideally, all I should ha=
ve to export from your example is the `Custom` class and `CustomTrait`. But=
since the latter is actually a specialization of a template that exists in=
a completely different namespace and module, I <i>also</i> have to export =
the trait from the standard library module. And I would probably have to ex=
port the `operator` overloads based on that trait. Or just have my module e=
xport the entire standard library module containing `CustomTrait`... which =
is kind of the opposite of how modules are supposed to work.<br></div><div>=
<br></div><div>Overall, I don't know why we should prefer a half-measur=
e library solution like this to a proper language solution. <i>Especially</=
i> when the language solution has already been approved by CWG. You're =
basically advocating removing something from the WP in order to replace it =
with a weaker version of itself.<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/ff4a00b8-cc13-40e6-8d13-43b1db40d5c3%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/ff4a00b8-cc13-40e6-8d13-43b1db40d5c3=
%40isocpp.org</a>.<br />
------=_Part_668_723417091.1550506165744--
------=_Part_667_1813401308.1550506165743--
.
Author: Vishal Oza <vickoza@gmail.com>
Date: Mon, 18 Feb 2019 15:11:38 -0800 (PST)
Raw View
------=_Part_825_753110887.1550531498254
Content-Type: multipart/alternative;
boundary="----=_Part_826_1496060744.1550531498254"
------=_Part_826_1496060744.1550531498254
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
I think that the spaceship operator <=3D> feature needs more information on=
=20
how it should be used for common programmer. I do not think that the=20
spaceship operator <=3D> should be used removed from the standard. I would=
=20
like some more books and articles on how to use this feature both as a=20
run-time feature and a compile-time feature.
On Saturday, February 16, 2019 at 3:43:01 PM UTC-6, libb...@gmail.com wrote=
:
>
> Hi everybody,=20
>
> I do not participate in C++ standardization, but I dislike <=3D> so much=
=20
> that I am considering writing an proposal to stop it.
> I know it is futile to try to revert feature this big this late in C++20=
=20
> cycle, it is mostly about doing the right thing=E2=84=A2 even when you ha=
ve zero=20
> chance of success. :)
>
> Draft is here=20
> <https://docs.google.com/document/d/1VMp3_Dn-bY0ic2tTYjzL26QaTX16s2kwtUYk=
NWTi9w0/edit?usp=3Dsharing>
> .
>
> Feel free to comment objections, requests for clarification... in the=20
> document or reply here.
> Also since I do not attend C++ standardization meetings if somebody likes=
=20
> the draft and is interested in presenting it that would also be great.
>
> regards,=20
> Ivan
>
--=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/c4244615-6097-4d4c-a87a-4b435911b8a5%40isocpp.or=
g.
------=_Part_826_1496060744.1550531498254
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">I think that the spaceship operator <=3D> feature ne=
eds more information on how it should be used for common programmer. I do n=
ot think that the spaceship operator <=3D> should be used removed fro=
m the standard. I would like some more books and articles on how to use thi=
s feature both as a run-time feature and a compile-time feature.<br><br>On =
Saturday, February 16, 2019 at 3:43:01 PM UTC-6, libb...@gmail.com wrote:<b=
lockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;borde=
r-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><div>Hi everybo=
dy, <br></div><div><br></div><div>I do not participate in
C++ standardization, but I dislike <=3D> so much that I am=20
considering writing an proposal to stop it.<br></div><div>I know it is=20
futile to try to revert feature this big this late in C++20 cycle, it is
mostly about doing the right thing<span>=E2=84=A2</span> even when you hav=
e zero chance of=20
success. :)</div><div><br></div><div>Draft=C2=A0 is <a href=3D"https://docs=
..google.com/document/d/1VMp3_Dn-bY0ic2tTYjzL26QaTX16s2kwtUYkNWTi9w0/edit?us=
p=3Dsharing" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D=
'https://docs.google.com/document/d/1VMp3_Dn-bY0ic2tTYjzL26QaTX16s2kwtU=
YkNWTi9w0/edit?usp\x3dsharing';return true;" onclick=3D"this.href=3D=
9;https://docs.google.com/document/d/1VMp3_Dn-bY0ic2tTYjzL26QaTX16s2kwtUYkN=
WTi9w0/edit?usp\x3dsharing';return true;">here</a>.</div><div><br></div=
><div>Feel free to comment objections, requests for clarification... in the=
document or reply here.</div><div>Also
since I do not attend C++ standardization meetings if somebody likes=20
the draft and is interested in presenting it that would also be great.<br><=
/div><div><br></div><div>regards, <br></div><div>Ivan<br></div></div></bloc=
kquote></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/c4244615-6097-4d4c-a87a-4b435911b8a5%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/c4244615-6097-4d4c-a87a-4b435911b8a5=
%40isocpp.org</a>.<br />
------=_Part_826_1496060744.1550531498254--
------=_Part_825_753110887.1550531498254--
.
Author: Barry Revzin <barry.revzin@gmail.com>
Date: Mon, 25 Feb 2019 05:40:55 -0800 (PST)
Raw View
------=_Part_687_1268959924.1551102055207
Content-Type: multipart/alternative;
boundary="----=_Part_688_663472820.1551102055208"
------=_Part_688_663472820.1551102055208
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On Saturday, February 16, 2019 at 3:43:01 PM UTC-6, libb...@gmail.com wrote=
:
>
> Hi everybody,=20
>
> I do not participate in C++ standardization, but I dislike <=3D> so much=
=20
> that I am considering writing an proposal to stop it.
> I know it is futile to try to revert feature this big this late in C++20=
=20
> cycle, it is mostly about doing the right thing=E2=84=A2 even when you ha=
ve zero=20
> chance of success. :)
>
> Draft is here=20
> <https://docs.google.com/document/d/1VMp3_Dn-bY0ic2tTYjzL26QaTX16s2kwtUYk=
NWTi9w0/edit?usp=3Dsharing>
> .
>
> Feel free to comment objections, requests for clarification... in the=20
> document or reply here.
> Also since I do not attend C++ standardization meetings if somebody likes=
=20
> the draft and is interested in presenting it that would also be great.
>
> regards,=20
> Ivan
>
<=3D> will be in C++20, and P1185 was just adopted in Kona, so it's not=20
really worth going through some of the arguments you make. But rather, I=20
thought it'd be worth trying to point something else out. The syntax you're=
=20
suggesting is:
class C{
public:
default operator: <,<=3D, =3D=3D, !=3D,>=3D,>;
private:
std::string a,b;
int c;
};
I do agree with the argument you make that most of the things you need to=
=20
write can be assumed. But you never actually try to define what this means.=
=20
Now, "what this means" for operators like =3D=3D, !=3D, <, and > seems pret=
ty=20
straightforward so you might be wondering why I am prodding here. But what=
=20
does <=3D do? You have two choices:
// option 1
bool operator<=3D(C const& lhs, C const& rhs) {
return lhs < rhs || lhs =3D=3D rhs;
}
// option 2
bool operator<=3D(C const& lhs, C const& rhs) {
return !(rhs < lhs);
}
Which do you pick? The "obvious" answer might be option 2 - it does fewer=
=20
operations, of course! But the way we get to option 2 is that we assume=20
that if a <=3D b is true precisely when a > b is false. That assumption onl=
y=20
holds when we have trichotomy - when we have a total order. If we have a=20
partial order, the transformation is invalid and will give you incorrect=20
answers. Consider float: 1.0f <=3D NaN needs to be false - but with option =
2=20
we'd get true.=20
In other words, your choice is:
- Default <=3D to use option 1. This is a large pessimization for totall=
y=20
odrered types.
- Default <=3D to use option 2. This will give incorrect answers for=20
partially ordered types.
Which do you pick? And how does the user override the choice if they need=
=20
the other? What if they don't know which they need?
This is a big advantage of <=3D>: you can easily specify the total vs parti=
al=20
difference, and then trivially propagate that through.=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/7ca8c57f-64d6-44aa-9bcf-1ae2535b3a26%40isocpp.or=
g.
------=_Part_688_663472820.1551102055208
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On Saturday, February 16, 2019 at 3:43:01 PM UTC-6, libb..=
..@gmail.com 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"><div>Hi everybody, <br></div><div><br></div><div>I do not participate =
in
C++ standardization, but I dislike <=3D> so much that I am=20
considering writing an proposal to stop it.<br></div><div>I know it is=20
futile to try to revert feature this big this late in C++20 cycle, it is
mostly about doing the right thing<span>=E2=84=A2</span> even when you hav=
e zero chance of=20
success. :)</div><div><br></div><div>Draft=C2=A0 is <a href=3D"https://docs=
..google.com/document/d/1VMp3_Dn-bY0ic2tTYjzL26QaTX16s2kwtUYkNWTi9w0/edit?us=
p=3Dsharing" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D=
'https://docs.google.com/document/d/1VMp3_Dn-bY0ic2tTYjzL26QaTX16s2kwtU=
YkNWTi9w0/edit?usp\x3dsharing';return true;" onclick=3D"this.href=3D=
9;https://docs.google.com/document/d/1VMp3_Dn-bY0ic2tTYjzL26QaTX16s2kwtUYkN=
WTi9w0/edit?usp\x3dsharing';return true;">here</a>.</div><div><br></div=
><div>Feel free to comment objections, requests for clarification... in the=
document or reply here.</div><div>Also
since I do not attend C++ standardization meetings if somebody likes=20
the draft and is interested in presenting it that would also be great.<br><=
/div><div><br></div><div>regards, <br></div><div>Ivan<br></div></div></bloc=
kquote><div><br></div><div><=3D> will be in C++20, and P1185 was just=
adopted in Kona, so it's not really worth going through some of the ar=
guments you make. But rather, I thought it'd be worth trying to point s=
omething else out. The syntax you're suggesting is:</div><div><br></div=
><div><span id=3D"docs-internal-guid-03635d25-7fff-d743-536e-a8bfa8597894">=
<p dir=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;margin-bottom:0pt;"=
><span style=3D"font-size: 11pt; font-family: Consolas; color: rgb(0, 0, 0)=
; background-color: transparent; font-variant-numeric: normal; font-variant=
-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;">clas=
s C{</span></p><p dir=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;marg=
in-bottom:0pt;"><span style=3D"font-size: 11pt; font-family: Consolas; colo=
r: rgb(0, 0, 0); background-color: transparent; font-variant-numeric: norma=
l; font-variant-east-asian: normal; vertical-align: baseline; white-space: =
pre-wrap;"> =C2=A0public:</span></p><p dir=3D"ltr" style=3D"line-height:1.3=
8;margin-top:0pt;margin-bottom:0pt;"><span style=3D"font-size: 11pt; font-f=
amily: Consolas; color: rgb(0, 0, 0); background-color: transparent; font-v=
ariant-numeric: normal; font-variant-east-asian: normal; vertical-align: ba=
seline; white-space: pre-wrap;"> =C2=A0=C2=A0=C2=A0default operator: <,&=
lt;=3D, =3D=3D, !=3D,>=3D,>;</span></p><p dir=3D"ltr" style=3D"line-h=
eight:1.38;margin-top:0pt;margin-bottom:0pt;"><span style=3D"font-size: 11p=
t; font-family: Consolas; color: rgb(0, 0, 0); background-color: transparen=
t; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-=
align: baseline; white-space: pre-wrap;"> =C2=A0private:</span></p><p dir=
=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span=
style=3D"font-size: 11pt; font-family: Consolas; color: rgb(0, 0, 0); back=
ground-color: transparent; font-variant-numeric: normal; font-variant-east-=
asian: normal; vertical-align: baseline; white-space: pre-wrap;"> =C2=A0=C2=
=A0=C2=A0std::string a,b;</span></p><p dir=3D"ltr" style=3D"line-height:1.3=
8;margin-top:0pt;margin-bottom:0pt;"><span style=3D"font-size: 11pt; font-f=
amily: Consolas; color: rgb(0, 0, 0); background-color: transparent; font-v=
ariant-numeric: normal; font-variant-east-asian: normal; vertical-align: ba=
seline; white-space: pre-wrap;"> =C2=A0=C2=A0=C2=A0int c;</span></p><p dir=
=3D"ltr" style=3D"line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span=
style=3D"font-size: 11pt; font-family: Consolas; color: rgb(0, 0, 0); back=
ground-color: transparent; font-variant-numeric: normal; font-variant-east-=
asian: normal; vertical-align: baseline; white-space: pre-wrap;">};</span><=
/p><div><span style=3D"font-size: 11pt; font-family: Consolas; color: rgb(0=
, 0, 0); background-color: transparent; font-variant-numeric: normal; font-=
variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap=
;"><br></span></div><div>I do agree with the argument you make that most of=
the things you need to write can be assumed. But you never actually try to=
define what this means. Now, "what this means" for operators lik=
e =3D=3D, !=3D, <, and > seems pretty straightforward so you might be=
wondering why I am prodding here. But what does <=3D do? You have two c=
hoices:<br></div><div><br></div><div><div class=3D"prettyprint" style=3D"ba=
ckground-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187); borde=
r-style: solid; border-width: 1px; overflow-wrap: break-word;"><code class=
=3D"prettyprint"><div class=3D"subprettyprint"><span style=3D"color: #800;"=
class=3D"styled-by-prettify">// option 1</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"><br></span><span style=3D"color: #008;" clas=
s=3D"styled-by-prettify">bool</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-=
prettify">operator</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify"><=3D(</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify">C </span><span style=3D"color: #008;" class=3D"styled-by-prettify">co=
nst</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> lhs</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"> C </span><span style=3D"co=
lor: #008;" class=3D"styled-by-prettify">const</span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">&</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"> rhs</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">)</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">{</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><b=
r>=C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-pret=
tify">return</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
"> lhs </span><span style=3D"color: #660;" class=3D"styled-by-prettify"><=
;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> rhs </sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">||</span><span=
style=3D"color: #000;" class=3D"styled-by-prettify"> lhs </span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">=3D=3D</span><span style=3D=
"color: #000;" class=3D"styled-by-prettify"> rhs</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><font color=3D"#000000"><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"><br><br></span><span style=3D"color:=
#800;" class=3D"styled-by-prettify">// option 2</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #008=
;" class=3D"styled-by-prettify">bool</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"sty=
led-by-prettify">operator</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify"><=3D(</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify">C </span><span style=3D"color: #008;" class=3D"styled-by-prett=
ify">const</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
&</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> lhs<=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"> C </span><span styl=
e=3D"color: #008;" class=3D"styled-by-prettify">const</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">&</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> rhs</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>=C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled=
-by-prettify">return</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>!(</span><span style=3D"color: #000;" class=3D"styled-by-prettify">rhs </s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify"><</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"> lhs</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">);</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">}</span></font></div></code></div><br>W=
hich do you pick? The "obvious" answer might be option 2 - it doe=
s fewer operations, of course! But the way we get to option 2 is that we as=
sume that if a <=3D b is true precisely when a > b is false. That ass=
umption only holds when we have trichotomy - when we have a total order. If=
we have a partial order, the transformation is invalid and will give you i=
ncorrect answers. Consider float: 1.0f <=3D NaN needs to be false - but =
with option 2 we'd get true.=C2=A0</div><div><br></div><div>In other wo=
rds, your choice is:</div><div><ul><li>Default <=3D to use option 1. Thi=
s is a large pessimization for totally odrered types.</li><li>Default <=
=3D to use option 2. This will give incorrect answers for partially ordered=
types.</li></ul></div><div>Which do you pick? And how does the user overri=
de the choice if they need the other? What if they don't know which the=
y need?</div><div><br></div><div>This is a big advantage of <=3D>: yo=
u can easily specify the total vs partial difference, and then trivially pr=
opagate that through.=C2=A0</div></span></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/7ca8c57f-64d6-44aa-9bcf-1ae2535b3a26%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/7ca8c57f-64d6-44aa-9bcf-1ae2535b3a26=
%40isocpp.org</a>.<br />
------=_Part_688_663472820.1551102055208--
------=_Part_687_1268959924.1551102055207--
.