220 32551 <4df4ee9a-d1e4-40cc-b50b-3109195133fd@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Mingxin Wang <wmx16835vv@163.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: constexpr ternary (was: Re: relaxing rules for
 ternary operator. Allow incompatible types.)
Date: Sun, 21 May 2017 07:34:08 -0700 (PDT)
Lines: 75
Approved: news@gmane.org
Message-ID: <4df4ee9a-d1e4-40cc-b50b-3109195133fd@isocpp.org>
References: <1b5ee8eb-53df-4e98-af2f-829c7bc2e5b2@isocpp.org>
 <9770742d-c5de-4a55-869f-ab71231cc775@isocpp.org> <9dbebffff1732ae5966a93b69a836757@kdab.com>
 <CAGsORuBi-W4ZjOiBbmPCErmkEVsa1zehi6fRfXr1EJ+=p6meyg@mail.gmail.com>
 <72a1eb41-3713-4602-84c0-e3fce2cadbd4@isocpp.org>
 <4752662e-21d2-4498-b236-a5dfb7cb2520@isocpp.org>
 <f392812b-7d49-4074-9710-93f9fc4262d3@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_2200_144066872.1495377248079"
X-Trace: blaine.gmane.org 1495377248 9065 195.159.176.226 (21 May 2017 14:34:08 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sun, 21 May 2017 14:34:08 +0000 (UTC)
Cc: zy@miator.net
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDNMBNHJWIGBBYGKQ3EQKGQEWYGG4GY@isocpp.org Sun May 21 16:34:04 2017
Return-path: <std-proposals+bncBDNMBNHJWIGBBYGKQ3EQKGQEWYGG4GY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f197.google.com ([209.85.161.197])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDNMBNHJWIGBBYGKQ3EQKGQEWYGG4GY@isocpp.org>)
	id 1dCRvo-0002Ei-BJ
	for gclcip-std-proposals@m.gmane.org; Sun, 21 May 2017 16:34:04 +0200
Original-Received: by mail-yw0-f197.google.com with SMTP id t9sf61170316ywe.12
        for <gclcip-std-proposals@m.gmane.org>; Sun, 21 May 2017 07:34:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:cc:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=DHW91J91Fkqw7SMCle85Jlb/bPtuaNyXd2gowsty5vk=;
        b=bk9xvlUC+5nLnnAOPXiJl+esBB55oU3yEgI+WcIK0UEX2sVkEph7LmSMDyPZCm7SAz
         r+O+QCcOx7ULBheJO/9exR2sFnx3nYLEUD8pQr1bMHA+EqGFXmZcoo+3MT6uTuyjw1cq
         cmqfQiBcSH0RXJltgTVOauwTtgEzNypEB9EnN+f0AiDKdBJMgraw+xP1fGa8QlSl2Lyy
         b9WJzLJ0w0jczO7UtNsNJdPMyiHS4DxgV14q6pAKZCWVkTFOcNJtLiNK/yxFOjPqZOop
         bZx6G27gauzpHTgUQVUmwrLOZGweuTLtEHep8FaYeEKTKVLPY2dBk8MUr7Lhp+4pFKCQ
         K9Wg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to
         :references:subject:mime-version:x-original-sender:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=DHW91J91Fkqw7SMCle85Jlb/bPtuaNyXd2gowsty5vk=;
        b=OF5czE+Nwa6K32OzFS8Sh+wUIuHIEoE/fkHwKlqGXEeNClzzasP18umZ4upsKrflyV
         mxcwz5WsxwM5f3xCLpV89nIe0hrWardo0ETjwJY/Lr65X/LbjcQzNyBaQMIB0taxfaYC
         RL5hSeGyAIr8b1erVKjKaX4cGT/EhWkbG/TLaRlooN2ptzbSaVHPB1H1AJ7qi2vxatc0
         Mpfec4EUj15yq2i448oEJcw3WXBcFWquWv7F9mHwqvnPrjYE2uZQ7++dQq+Go5Sry0IK
         dMADLQa1TuyYcUHvlJ7eHZUv7kqdBxsXcw3A4nQy941tb0e/CMuuwDkIzSnNLuy6sD3U
         MLWA==
X-Gm-Message-State: AODbwcBdX4Z8Df003XCMFK9oHbFPRaKw+JoJBn7Tdn27BlUmZwzCQWu6
	rSzK1Bo7/FQFmkJ5
X-Received: by 10.129.161.22 with SMTP id y22mr8916992ywg.166.1495377249358;
        Sun, 21 May 2017 07:34:09 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.17.19 with SMTP id g19ls1922913ote.17.gmail; Sun, 21 May
 2017 07:34:08 -0700 (PDT)
X-Received: by 10.157.28.130 with SMTP id l2mr391757ota.17.1495377248537;
        Sun, 21 May 2017 07:34:08 -0700 (PDT)
In-Reply-To: <f392812b-7d49-4074-9710-93f9fc4262d3@isocpp.org>
X-Original-Sender: wmx16835vv@163.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: <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:32551
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/32551>

------=_Part_2200_144066872.1495377248079
Content-Type: multipart/alternative; 
	boundary="----=_Part_2201_1919695596.1495377248079"

------=_Part_2201_1919695596.1495377248079
Content-Type: text/plain; charset="UTF-8"

If the type cannot be deduced at compile time, then runtime overhead 
is inevitable.

On Sunday, May 21, 2017 at 9:59:43 PM UTC+8, Nicol Bolas wrote:
>
> On Saturday, May 20, 2017 at 10:54:38 PM UTC-4, Mingxin Wang wrote:
>>
>> If the condition is not "constexpr",  and the types are determined at 
>> runtime, the "proxies" and the "wrappers" can be used to solve this 
>> problem. (
>> https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/kvkgsHM6wFQ
>> )
>>
>
> So long as you're willing to suffer through needless virtual call 
> overhead, as well as less obvious code, yes.
>

-- 
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/4df4ee9a-d1e4-40cc-b50b-3109195133fd%40isocpp.org.

------=_Part_2201_1919695596.1495377248079
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><font face=3D"georgia, serif">If the type cannot be deduce=
d at compile time, then runtime overhead is=C2=A0inevitable.</font><br><br>=
On Sunday, May 21, 2017 at 9:59:43 PM UTC+8, Nicol Bolas wrote:<blockquote =
class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1p=
x #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">On Saturday, May 20, 2017=
 at 10:54:38 PM UTC-4, Mingxin Wang wrote:<blockquote class=3D"gmail_quote"=
 style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-lef=
t:1ex"><div dir=3D"ltr"><div></div><div>If the condition is not &quot;const=
expr&quot;,=C2=A0=C2=A0and the types are determined at runtime, the &quot;p=
roxies&quot; and the &quot;wrappers&quot; can be used to solve this problem=
.. (<a href=3D"https://groups.google.com/a/isocpp.org/forum/#!topic/std-prop=
osals/kvkgsHM6wFQ" rel=3D"nofollow" target=3D"_blank" onmousedown=3D"this.h=
ref=3D&#39;https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposa=
ls/kvkgsHM6wFQ&#39;;return true;" onclick=3D"this.href=3D&#39;https://group=
s.google.com/a/isocpp.org/forum/#!topic/std-proposals/kvkgsHM6wFQ&#39;;retu=
rn true;">https://groups.google.com/a/<wbr>isocpp.org/forum/#!topic/std-<wb=
r>proposals/kvkgsHM6wFQ</a>)</div></div></blockquote><div><br>So long as yo=
u&#39;re willing to suffer through needless virtual call overhead, as well =
as less obvious code, yes.<br></div></div></blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; 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/4df4ee9a-d1e4-40cc-b50b-3109195133fd%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/4df4ee9a-d1e4-40cc-b50b-3109195133fd=
%40isocpp.org</a>.<br />

------=_Part_2201_1919695596.1495377248079--

------=_Part_2200_144066872.1495377248079--

.
