220 37315 <CANiq72mfBwiswcpwwBrdfdtYpPbDTe-ZNxHxaBhS5_vDUpagtA@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Pointer overload for ||
Date: Mon, 12 Mar 2018 12:06:43 +0100
Lines: 27
Approved: news@gmane.org
Message-ID: <CANiq72mfBwiswcpwwBrdfdtYpPbDTe-ZNxHxaBhS5_vDUpagtA@mail.gmail.com>
References: <1fea07df-46a6-4df2-865a-849be8f8d129@isocpp.org>
 <CANiq72kL7HQf2oS5THm8bxzurhzoc7uhNQq3S9+zvBce2yMZZQ@mail.gmail.com>
 <c7cd5d95-0031-4e50-b7a1-9adcff695bd2@isocpp.org> <CALvx3hYz84MdBu_WsixPmWf8N=9FY4BiqOv+Lon21nF2m_f0Ow@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: blaine.gmane.org 1520852702 2694 195.159.176.226 (12 Mar 2018 11:05:02 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 12 Mar 2018 11:05:02 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDRZHGH43YJRBWF6THKQKGQE3FRSBBY@isocpp.org Mon Mar 12 12:04:58 2018
Return-path: <std-proposals+bncBDRZHGH43YJRBWF6THKQKGQE3FRSBBY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qk0-f198.google.com ([209.85.220.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDRZHGH43YJRBWF6THKQKGQE3FRSBBY@isocpp.org>)
	id 1evLGE-0000Xo-Jh
	for gclcip-std-proposals@m.gmane.org; Mon, 12 Mar 2018 12:04:58 +0100
Original-Received: by mail-qk0-f198.google.com with SMTP id 13sf7744201qkg.23
        for <gclcip-std-proposals@m.gmane.org>; Mon, 12 Mar 2018 04:07:05 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1520852825; cv=pass;
        d=google.com; s=arc-20160816;
        b=goIin31qRUeH11OGzOwmDE7PcCEBbzgXb3rTu71XQcGEhs5DBab/nd/tE+QzWw+Z/d
         shGcLYx9LTz8ZqcQA3oIzpquIM1LK2EFJaxcbecwIl/tK7B4U9cJA8+wiq2/dVpY991N
         n6M19AJgMly7eIAxZbLJITcfLgimFXmL1FtJWmQDFxxNQUDCS+9PFYdI2bqo99oR/NeS
         ZWksdaIQ8VEAbLpKAjtG1CuyiT2gDzH5uk58M27IIq6UdtAds84zLdonGfyiXGULqIx2
         qjzBDm28oBm4On3zTYfz8Zfy/3fzqdPEjuPsN8FIFGLCK1INjVlPnuWVwohIVvC3AduM
         cofA==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date
         :from:references:in-reply-to:mime-version:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=x6ADzptEG8BOehpX5/NN2HtJd5rq5eCeJeGpVCxluW4=;
        b=xExCQFCTANq5AIMfRzwIoq1ciihoSY7oMCNkgLdgmKEfG24JCLu2l+2/IoPOA7L4Ai
         s82e4Pj7lLJohCUaBQvAVa1KvtGdAnWKVu/LCLm4eialhP2je+KtwoZO17ROi4E8YY4d
         jQ4pLkMpokQzBEKNdWmQYeJ3AY21HWu87rBEOMmvsZeHD+fdqTg9t/+hjp70CIaeTm6S
         kKJy+t5DHJXQaRDHV++IB28HRqnpORhMHi5C5yctSY8Z0w7bNDyZmaXTr9pUt6xDCIOk
         P2F6ipydO1HAOBXmCyQCVUIG6KFtsLkq1yOJz4C/E8jDVyo5o6SEh165Nt+kDvBTH53A
         styg==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=l54kmmsx;
       spf=pass (google.com: domain of miguel.ojeda.sandonis@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=miguel.ojeda.sandonis@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=x6ADzptEG8BOehpX5/NN2HtJd5rq5eCeJeGpVCxluW4=;
        b=TUClL91MjuKZwwEqFiPpO1JGIEXbQUVsfnYgrCYuDlhRbzdZGlrV5MEW5r+q4MoiqN
         mUzIif77AD7Hay+qaTORP+bZTtnpELdAeLAaijvUBkTbpGMbx/DQ81EHWptfnq5qTFLD
         VbplilNk54R4f1JLhDFqM/xohTciL2Ao8V6k4bfXbzdEOTGwKhhe219eaL7S0HZTvZxg
         IyJW7ye6+6nsLRtCS23b+v6uHT3845FS298J4xINSAuk+3kHU3Z2wYoOOONb0zLiYfCC
         XG811f1jc0ypnCeen2gYutI7YglB9q7FgDeIYM9QZo5kph0HWEF/jzPX+ZqItrvUuR1q
         4WXA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=x6ADzptEG8BOehpX5/NN2HtJd5rq5eCeJeGpVCxluW4=;
        b=J3Xs1vLakt1KlFmplUH8bhrN2yncJEPQ7Kk1poFqlSmMXOKp/jPX713H8JM/jxUqBu
         R1yX2t0haj28zg3P3HaMz3J00Me4NLEN3zh4E4eAmoq5XcORakcKl0LQIaOsd9GqfKN0
         rvbmZkMQXcuatXUGm1BCI1uskLCqRGD0S/M/tygPEY+srp+XtTQLcDa6tLn4LO/EouW6
         i1ujCMrzsU9zns8oOyJDuepM4IulDaefVrB5gKEwWFTyYw99/fYsjHHo7wRLtEmHEMaf
         3nbFtMQ665n+lj075zMQrCsuL/2K9jCPknP4uN8Frqimb86r0CBaCGXohM4HcHiE/q0O
         85bA==
X-Gm-Message-State: AElRT7FMeCc36SPIsLv31wZOc/AfIpryGes1IazWc0kFDbRJW6nE4uef
	mx4eN+DnPLHdO7a5EJAVtFNeDA==
X-Google-Smtp-Source: AG47ELulZAfkoIm5anbEfGls9G6nR8eEZHcHyfsyH+XfSwHzWE5kkljtA1SF8bds06Li6eNa+hRD/Q==
X-Received: by 10.55.95.4 with SMTP id t4mr5504397qkb.11.1520852825447;
        Mon, 12 Mar 2018 04:07:05 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.233.237.3 with SMTP id c3ls2312988qkg.8.gmail; Mon, 12 Mar
 2018 04:07:04 -0700 (PDT)
X-Received: by 10.55.192.151 with SMTP id v23mr6880196qkv.83.1520852824416;
        Mon, 12 Mar 2018 04:07:04 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1520852824; cv=none;
        d=google.com; s=arc-20160816;
        b=coawQtspltuYUbHYcFRJaqaMjvG6SD1IBVTcy3unBrqbh/2ftK9W/FsUR/xEKL/t9r
         HDrDKuZQlb//4mjSXjWex4xOhp56JMRYmmTDFSJSUq/ZP/87hsVTF9xWl6upaXjQeROa
         2n1beYJmCEG+7wQn4c86H7kOJH80NnjqEqtQo29HhW40WV6AyI6NPR8MXC7kLU/21Esh
         VONBmfgJxhHeIULEgEDUzUp4mFTRJWAt8ZylGVHjv2Ct28cHnAJm1NtiSuMJ2EWfrLBc
         EXbES/2rwpQyLT0OSVqlx4QAJHWNZdbKWB67+rXA4sLoYP+GSGKUqmfIE4LCtg2pMs42
         5jcQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:references:in-reply-to:mime-version
         :dkim-signature:arc-authentication-results;
        bh=608Vt4eBL14Vw/UPHIP+sq2vb5kRgzkJTTp5gOeHcZ0=;
        b=hDiB3kEG4w2pPENjXsy5uU7HryEMFQktHUt8I/kjah/Rta4S97Ri8gceA+u+PxMw94
         x3OwEdebtW3uh5T6xKz6UTygCVt3G4uYXBMO2Ui5BY5sTbAPc+7IbhF4B5LaeE8DTwqw
         NZmRQ/cZI3SmkZVsQXQXSq4uL6fX0Srxl6xzEadF4T4tynDm2pQIFJ8kbxsFveJteVtc
         kSzrUUPzkPO8N2RMFXURhJCmC4bPhl4sq0wiSDT3mhdtcrkgzN37GB+w7qPO0wg4JwoL
         APEQVzFqxMph+9ahK1cKYthAB2hq+c6OWoazFywaO1Nwd4uAbBo5x8IkaBpZ3lVB75vy
         NlGA==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=l54kmmsx;
       spf=pass (google.com: domain of miguel.ojeda.sandonis@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=miguel.ojeda.sandonis@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Original-Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
        by mx.google.com with SMTPS id j125sor4882167qkc.104.2018.03.12.04.07.04
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Mon, 12 Mar 2018 04:07:04 -0700 (PDT)
Received-SPF: pass (google.com: domain of miguel.ojeda.sandonis@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 10.55.104.3 with SMTP id d3mr1108039qkc.306.1520852823873; Mon,
 12 Mar 2018 04:07:03 -0700 (PDT)
Original-Received: by 10.200.52.247 with HTTP; Mon, 12 Mar 2018 04:06:43 -0700 (PDT)
In-Reply-To: <CALvx3hYz84MdBu_WsixPmWf8N=9FY4BiqOv+Lon21nF2m_f0Ow@mail.gmail.com>
X-Original-Sender: miguel.ojeda.sandonis@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=l54kmmsx;       spf=pass
 (google.com: domain of miguel.ojeda.sandonis@gmail.com designates
 209.85.220.41 as permitted sender) smtp.mailfrom=miguel.ojeda.sandonis@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:37315
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/37315>

On Mon, Mar 12, 2018 at 8:33 AM, Richard Hodges <hodges.r@gmail.com> wrote:
> I am a little surprised and dismayed at the eagerness to resort to macros.
>
> We can already safely overload operators with a custom generator type. No
> need for macros, language extensions or any other magic.
>
> live demonstration: http://coliru.stacked-crooked.com/a/bc751df610a220ce

Not sure what is your point. I already suggested the functor approach,
plus the restriction of the overloads as needed if he wanted to use
operator||.

As for the other approaches, I am unsure what do you find "magical"
about them. They are quite clear. :-)

By the way, embedding the code in the email is better for discussion
and archival purposes.

Cheers,
Miguel

-- 
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/CANiq72mfBwiswcpwwBrdfdtYpPbDTe-ZNxHxaBhS5_vDUpagtA%40mail.gmail.com.

.
