220 4240 <CAFk2RUZw2wyMrbaRpYzWApeRNp2kx0MK7wurbD09P+D5r_As9w@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Ville Voutilainen <ville.voutilainen@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Fixing Standard Library relational operators (was:
 Re: optional Rev.4 (N3672): What was the rationale to remove
 !=, >=, ...)
Date: Fri, 3 May 2013 17:43:58 +0300
Lines: 101
Approved: news@gmane.org
Message-ID: <CAFk2RUZw2wyMrbaRpYzWApeRNp2kx0MK7wurbD09P+D5r_As9w@mail.gmail.com>
References: <CAGg_6+NTws7QyEAsEUd308yx4LncpD_r6x4yJEJy5RN2w6v2Hw@mail.gmail.com>
	<CAGg_6+PTyNK6rTAdC3NKLOnLR3g0WfyqgNKmHz-9edMOdjnVNA@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=047d7b2e41a499ac3604dbd16174
X-Trace: ger.gmane.org 1367592245 21577 80.91.229.3 (3 May 2013 14:44:05 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 3 May 2013 14:44:05 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC5JHI7A7ALRBMM2R6GAKGQER2P5AVI@isocpp.org Fri May 03 16:44:05 2013
Return-path: <std-proposals+bncBC5JHI7A7ALRBMM2R6GAKGQER2P5AVI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ia0-f200.google.com ([209.85.210.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC5JHI7A7ALRBMM2R6GAKGQER2P5AVI@isocpp.org>)
	id 1UYHDP-0002bh-3N
	for gclcip-std-proposals@m.gmane.org; Fri, 03 May 2013 16:44:03 +0200
Original-Received: by mail-ia0-f200.google.com with SMTP id p22sf6154209iad.3
        for <gclcip-std-proposals@m.gmane.org>; Fri, 03 May 2013 07:44:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=x-received:x-beenthere:x-received:received-spf:mime-version
         :x-received:in-reply-to:references:date:message-id:subject:from:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-google-group-id:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe:content-type;
        bh=p01kgRyEWal7rxw1RE5JGzn5oJMnU9cdwVQGvfzjfqs=;
        b=HD5jnpHjyWm30RWf/ICPeXrt7nBLAQHSyoglLRFuMlyTxZkXM/2fuTDyrxmNQhi1Q7
         lgCdc17uNGdDCOF+GE7COUx1tBz4LS30lx7qmA2qCBWKSlrMiOzPfMon/FrzquV86j2U
         OOWv1YTslX001xphk4yMQTnVMi5SYDLVPRtJF4bv76gIQeqrTkYBHkU5TrS/WimjMIfY
         wbJhzanx/7KLb5qTIVG2sEe3J6L52uP/7ueiwavgpa7J/bllknqrTII1KFJaP9Yz4t6B
         Qjf+yvmXkDeLMkasfHhgtTX9D4BRemxWyiZAuiRW/ArBlNMeSNrx3TJshZnd7U4sCscK
  
X-Received: by 10.182.61.4 with SMTP id l4mr8958890obr.9.1367592241946;
        Fri, 03 May 2013 07:44:01 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.182.118.197 with SMTP id ko5ls212370obb.35.gmail; Fri, 03 May
 2013 07:43:59 -0700 (PDT)
X-Received: by 10.182.97.40 with SMTP id dx8mr2970894obb.54.1367592239129;
        Fri, 03 May 2013 07:43:59 -0700 (PDT)
Original-Received: from mail-oa0-f51.google.com (mail-oa0-f51.google.com [209.85.219.51])
        by mx.google.com with ESMTPS id fx9si2535875obb.153.2013.05.03.07.43.59
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Fri, 03 May 2013 07:43:59 -0700 (PDT)
Received-SPF: pass (google.com: domain of ville.voutilainen@gmail.com designates 209.85.219.51 as permitted sender) client-ip=209.85.219.51;
Original-Received: by mail-oa0-f51.google.com with SMTP id g12so1701303oah.38
        for <std-proposals@isocpp.org>; Fri, 03 May 2013 07:43:59 -0700 (PDT)
X-Received: by 10.182.97.129 with SMTP id ea1mr2985815obb.85.1367592238949;
 Fri, 03 May 2013 07:43:58 -0700 (PDT)
Original-Received: by 10.76.10.130 with HTTP; Fri, 3 May 2013 07:43:58 -0700 (PDT)
In-Reply-To: <CAGg_6+PTyNK6rTAdC3NKLOnLR3g0WfyqgNKmHz-9edMOdjnVNA@mail.gmail.com>
X-Original-Sender: ville.voutilainen@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of ville.voutilainen@gmail.com designates 209.85.219.51 as permitted
 sender) smtp.mail=ville.voutilainen@gmail.com;       dkim=pass header.i=@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post?hl=en>,
 <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?hl=en&topic=25838>,
 <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:4240
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/4240>

--047d7b2e41a499ac3604dbd16174
Content-Type: text/plain; charset=ISO-8859-1

On 3 May 2013 17:27, Nevin Liber <nevin@eviloverlord.com> wrote:

> The other, simpler possibility is to not specialize the arithmetic
> operations:
>
> operator< should be implemented in terms of std::less of the underlying
> component(s)
> operator== should be implemented in terms of std::equal_to of the
> underlying component(s)
>

I think Tony has a valid point about the first one - it will give a wrapper
of a complex an operator<,
and potentially for other types of the kind where operator< isn't
desirable, but an std::less specialization
is. I fail to see what equal_to brings into this, but that's just because I
fail to imagine when is it
ever not the same as operator==.


> This may have surprising results for those who, for instance, think
> operator< and std::less should do different things (the only place in the
> standard which does this as far as I know is for pointers, and that is only
> because C doesn't give them a total ordering), but I see that being as
> insane as NaN.
>
>
>
Agreed, the pointer situation is unfortunate, but it seems likely that
other types will have this difference
between op< and less.

-- 

--- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en.



--047d7b2e41a499ac3604dbd16174
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><br><div class=3D"gmail=
_quote">On 3 May 2013 17:27, Nevin Liber <span dir=3D"ltr">&lt;<a href=3D"m=
ailto:nevin@eviloverlord.com" target=3D"_blank">nevin@eviloverlord.com</a>&=
gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">The other, simpler possibility is to not spe=
cialize the arithmetic operations:<br><div class=3D"gmail_quote"><div>



<br>operator&lt; should be implemented in terms of std::less of the underly=
ing component(s)<br>operator=3D=3D should be implemented in terms of std::e=
qual_to of the underlying component(s)</div></div></blockquote><div><br></d=
iv>
<div>I think Tony has a valid point about the first one - it will give a wr=
apper of a complex an operator&lt;,<br></div><div>and potentially for other=
 types of the kind where operator&lt; isn&#39;t desirable, but an std::less=
 specialization<br>
is. I fail to see what equal_to brings into this, but that&#39;s just becau=
se I fail to imagine when is it<br>ever not the same as operator=3D=3D. <br=
>=A0<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex">
<div class=3D"gmail_quote"><div>This may have surprising results for those =
who, for instance, think operator&lt; and std::less should do different thi=
ngs (the only place in the standard which does this as far as I know is for=
 pointers, and that is only because C doesn&#39;t give them a total orderin=
g), but I see that being as insane as NaN.<br>



<br><br></div></div></blockquote><div><br></div><div>Agreed, the pointer si=
tuation is unfortunate, but it seems likely that other types will have this=
 difference<br>between op&lt; and less. <br></div></div><br></div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
&nbsp;<br />
&nbsp;<br />

--047d7b2e41a499ac3604dbd16174--

.
