220 32535 <9770742d-c5de-4a55-869f-ab71231cc775@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: ma.kalbfuss@web.de
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: relaxing rules for ternary operator. Allow
 incompatible types.
Date: Sat, 20 May 2017 12:45:26 -0700 (PDT)
Lines: 129
Approved: news@gmane.org
Message-ID: <9770742d-c5de-4a55-869f-ab71231cc775@isocpp.org>
References: <1b5ee8eb-53df-4e98-af2f-829c7bc2e5b2@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1870_1211906855.1495309526348"
X-Trace: blaine.gmane.org 1495309534 7225 195.159.176.226 (20 May 2017 19:45:34 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 20 May 2017 19:45:34 +0000 (UTC)
Cc: ma.kalbfuss@web.de
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC7YTI72XQOBBV5ZQLEQKGQENQMBLMA@isocpp.org Sat May 20 21:45:23 2017
Return-path: <std-proposals+bncBC7YTI72XQOBBV5ZQLEQKGQENQMBLMA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pf0-f197.google.com ([209.85.192.197])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBC7YTI72XQOBBV5ZQLEQKGQENQMBLMA@isocpp.org>)
	id 1dCAJW-0001bH-PV
	for gclcip-std-proposals@m.gmane.org; Sat, 20 May 2017 21:45:23 +0200
Original-Received: by mail-pf0-f197.google.com with SMTP id e8sf82016653pfl.4
        for <gclcip-std-proposals@m.gmane.org>; Sat, 20 May 2017 12:45:28 -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=pUxtLZsfE61rGfQ0QCu4HEmC2VsA9aqHb6n4Wz6cxDU=;
        b=oQUliSY3vjdcQotlkNhZT+BsldIsp6o1G8B6pbOqd440q0eAwEQoH/GPM5nXxpDUOT
         pW5JEaAneRCdjy9LKHl54WgF+MGW7yrTBqqSBBYXvRg7tNrm0GQDusZ5dg3b6JneXzvB
         XDIdG6pfhOybvhPiGD/DsxWpm6IOo9a9Iuts3XgKaiFOeov2hvBz7m9CL5YwVA5zckYj
         S9xJ+KV1Kc3nF5B25bAhMn6gqUEUyRU6XIeELgdZ6T2v+NGiet9I4YS0trU2tfF66e8V
         NsGk6lSUWT55ctdd4dtrBSIKjw3s0FdIdT477IzRt2i8zqORWqwVSGSf1sJM+eLSBzZQ
         7ntQ==
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=pUxtLZsfE61rGfQ0QCu4HEmC2VsA9aqHb6n4Wz6cxDU=;
        b=tP9E6b1pMmnUger75w7n3oosUinX5m2X6wxb6x07AgbeP7yv1HIe56NwHTCxoAsSLQ
         HLEn0dFv0QtkkkQj6FzTU+Rt/tSAzyQiJAfb/WLU7hIiH9NOsZ21IatfBthLmW4KyK6L
         d60DiE/1HykttXjTKEPNKjUXy93VsjVkv9XDNCV4kDcg+iSN3hHEOxsB3Fkr8B3sCy36
         hMq08rAyrlXGOZ2l/vX/yPKQ1MgL3blZe9jzV/V0EYoAk2WQhE6EBBnyhZp2QEcWiREv
         u8lla5cG4IcjdvJQ5xvL7GvUPYDTYa8AUebm4jrCR7oQCldJMR55+CTqTqDL7eI0pzQE
         CeZg==
X-Gm-Message-State: AODbwcDQwK7J6FtnYyJfiyZMNgQ7izmgFBFkrPGS/g6UmexiCHzS4Vm5
	a85KcRAhUjYaG9Zc
X-Received: by 10.99.99.198 with SMTP id x189mr7294618pgb.110.1495309527734;
        Sat, 20 May 2017 12:45:27 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.82.29 with SMTP id e29ls1042956oth.7.gmail; Sat, 20 May
 2017 12:45:26 -0700 (PDT)
X-Received: by 10.157.33.109 with SMTP id l42mr331316otd.7.1495309526897;
        Sat, 20 May 2017 12:45:26 -0700 (PDT)
In-Reply-To: <1b5ee8eb-53df-4e98-af2f-829c7bc2e5b2@isocpp.org>
X-Original-Sender: ma.kalbfuss@web.de
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:32535
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/32535>

------=_Part_1870_1211906855.1495309526348
Content-Type: multipart/alternative; 
	boundary="----=_Part_1871_1679238250.1495309526348"

------=_Part_1871_1679238250.1495309526348
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Thanks for your answer. I see the problem now. The condition is a runtime=
=20
condition. So this isn't going to work. But wouldn't it be possible for a=
=20
constexpr condition?

for Example:

auto x =3D (std::is_integral_v<T>) ? A{} : B{};



This would be like if constexpr with implicit constexpr determinded by the=
=20
compiler.


Am Samstag, 20. Mai 2017 19:41:57 UTC+2 schrieb ma.ka...@web.de:
>
> Hi Guys,
>
> I had the following situation:
>
> I have a Group of StaticSet classes with a compatible interface but=20
> distinct in there concrete type. empty_set is not an intervall!
> I tried the following:
>
>
> auto dec_digit =3D make_interval('0', '0' + std::min(base, DECIMAL_BASE) =
-=20
> 1);
> auto upper_digit =3D (base > DECIMAL_DIGIT) ? make_interval('A', 'A' + (b=
ase=20
> - 1 - DECIMAL_BASE)) : empty_set;
> auto lower_digit =3D (base > DECIMAL_DIGIT) ? make_interval('a', 'a' + (b=
ase=20
> - 1 - DECIMAL_BASE)) : empty_set;
>
>
> Wouldn't it be possible to allow such code, especially in conjunction wit=
h=20
> concepts?
>
> MFG
>
> Martin Kalbfu=C3=9F
>

--=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/9770742d-c5de-4a55-869f-ab71231cc775%40isocpp.or=
g.

------=_Part_1871_1679238250.1495309526348
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Thanks for your answer. I see the problem now. The conditi=
on is a runtime condition. So this isn&#39;t going to work. But wouldn&#39;=
t it be possible for a constexpr condition?<br><br>for Example:<br><br><div=
 style=3D"background-color: rgb(250, 250, 250); border-color: rgb(187, 187,=
 187); border-style: solid; border-width: 1px; overflow-wrap: break-word;" =
class=3D"prettyprint"><code class=3D"prettyprint"><div class=3D"subprettypr=
int"><span style=3D"color: #008;" class=3D"styled-by-prettify">auto</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> x </span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">(</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify">std</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">::</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify">is_integral_v</span><span style=3D"color: #660;" class=3D"styled-=
by-prettify">&lt;</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify">T</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&g=
t;)</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">?</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> A</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">{}</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">:</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"> B</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">{};</span></div></code></div><br><br><br>This would be like if cons=
texpr with implicit constexpr determinded by the compiler.<br><br><br>Am Sa=
mstag, 20. Mai 2017 19:41:57 UTC+2 schrieb ma.ka...@web.de:<blockquote clas=
s=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #c=
cc solid;padding-left: 1ex;"><div dir=3D"ltr">Hi Guys,<br><br>I had the fol=
lowing situation:<br><br>I have a Group of StaticSet classes with a compati=
ble interface but distinct in there concrete type. empty_set is not an inte=
rvall!<br>I tried the following:<br><br><br>auto dec_digit =3D make_interva=
l(&#39;0&#39;, &#39;0&#39; + std::min(base, DECIMAL_BASE) - 1);<br>auto upp=
er_digit =3D (base &gt; DECIMAL_DIGIT) ? make_interval(&#39;A&#39;, &#39;A&=
#39; + (base - 1 - DECIMAL_BASE)) : empty_set;<br>auto lower_digit =3D (bas=
e &gt; DECIMAL_DIGIT) ? make_interval(&#39;a&#39;, &#39;a&#39; + (base - 1 =
- DECIMAL_BASE)) : empty_set;<br><br><br>Wouldn&#39;t it be possible to all=
ow such code, especially in conjunction with concepts?<br><br>MFG<br><br>Ma=
rtin Kalbfu=C3=9F<br></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/9770742d-c5de-4a55-869f-ab71231cc775%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/9770742d-c5de-4a55-869f-ab71231cc775=
%40isocpp.org</a>.<br />

------=_Part_1871_1679238250.1495309526348--

------=_Part_1870_1211906855.1495309526348--

.
