220 34709 <20171009040212.5161043.12800.37351@gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Tony V E <tvaneerd@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Extensions for Disambiguation Tags
Date: Mon, 09 Oct 2017 00:02:12 -0400
Lines: 106
Approved: news@gmane.org
Message-ID: <20171009040212.5161043.12800.37351@gmail.com>
References: <527c448b-b8dd-4877-b63f-b399c167da4d@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Trace: blaine.gmane.org 1507521743 25397 195.159.176.226 (9 Oct 2017 04:02:23 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 9 Oct 2017 04:02:23 +0000 (UTC)
To: Mingxin Wang <std-proposals@isocpp.org>, ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCUZ5QWKNQIMN2PLZYCRUBCD7TVKE@isocpp.org Mon Oct 09 06:02:12 2017
Return-path: <std-proposals+bncBCUZ5QWKNQIMN2PLZYCRUBCD7TVKE@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi0-f70.google.com ([209.85.218.70])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCUZ5QWKNQIMN2PLZYCRUBCD7TVKE@isocpp.org>)
	id 1e1PGa-0004kE-9V
	for gclcip-std-proposals@m.gmane.org; Mon, 09 Oct 2017 06:02:08 +0200
Original-Received: by mail-oi0-f70.google.com with SMTP id q4sf4711133oic.12
        for <gclcip-std-proposals@m.gmane.org>; Sun, 08 Oct 2017 21:02:16 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1507521735; cv=pass;
        d=google.com; s=arc-20160816;
        b=q1crwSmrt1aKwTsmrSkzD48SZMZletYnzpbbu/VcqxBm+ax2mzLYm/3zn+7xCCktzv
         +Z8ZKOzI5kLfUTuL5kQN5ogsRDT0OVjFDeuTFdrED3mb/2RXkQm3UkbAeE/reBJRqgop
         BeMEeF7VSprKXMD69JNHGNPpdcJsvd0q6IzCtSqHtc5UxCtOvT95i6J0NaUWpaJYw1rQ
         nYPdly8vh409g4fJksDx4h771z+JH9pbpZe/adVZxNRw6ndv/SP96PbbsCxhqd4jcB1G
         yVbWGehIP5kxwAwdD1+Yn9s/FOa7kOaPzyXKsUCYfKt/Gynmkn2ZzIaVTJWNo+MyUiqC
         3XIQ==
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:references:in-reply-to
         :from:subject:date:message-id:content-transfer-encoding:mime-version
         :arc-authentication-results:arc-message-signature:dkim-signature
         :arc-authentication-results;
        bh=unYYiIUmEh6oxnkI+CK9+y+/gCcX0x7PRvQLNxsmGoI=;
        b=ceV+kDRSD4Bpv0It/fINPcyJaSYaZDm3O7WdJV9UUQNmx/+8vwTiY/AOq0dT7xcgZd
         MPq4fI5Hyg88ls5Z2PHCt8TfHoFo/kal5VWMhKbNLY9U2EoUB85b6HO+XZuo5WbUWPMY
         rCS6OTui+aLGrSa3P/Dzs06TkRd8nz3YeSNVe3Psqo5KwUJlggl/PUG8LkKxcxG8BYrm
         /OXafRH4svJkTTBjnQH38H3vQfdW9w1twi+ZV7ctcDHO2HMDZUuGO06MEzga2q96KYQv
         hXc74xA6inoQi4DTEqa/eOWcw3l8GptG3FXnO/Sp55aNFlZVDpb+8JM/LupqguSuO63r
         3PqQ==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=EPtcl5Ha;
       spf=pass (google.com: domain of tvaneerd@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tvaneerd@gmail.com;
       dmarc=pass (p=NONE sp=NONE 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:content-transfer-encoding:message-id:date:subject:from
         :in-reply-to:references: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=unYYiIUmEh6oxnkI+CK9+y+/gCcX0x7PRvQLNxsmGoI=;
        b=bhmqwobhb2JLhDVtWbTZC8L53qCIQNCmHpENeYWkFmAet8RETa7qfqJojpTX49GmRx
         lXUzumdZQL94iNBtbNLmgp6yhKrfAArZn+xSz4f218XVWWq3hJsm1oI5wmy1vEAe1zc+
         AET2pkgYTcs5ErokN6TgMQpzLFHItFfdHOTjeHskRFA2kFUtdNpY3jueh8nMqZLjFAr7
         tKrbxsaZWPCogIYKd8K3iiYa9x482q81W9Hsr222+cbSxX4HMDYiFn6b7E++NmPtzMW5
         aJl6hgKk6Px1AHZDqy3ABt1alz9+7RLWFujmCwFsfKN7G7Fj7XzR8Z1fz7AlIH2CaJIr
         8wqw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:content-transfer-encoding
         :message-id:date:subject:from:in-reply-to:references: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=unYYiIUmEh6oxnkI+CK9+y+/gCcX0x7PRvQLNxsmGoI=;
        b=JQQuULz5ZL+MTYkDbBkS3FhEtDZSCXSVLfT+qeC2LB4X7JTIq+SpjippqTt98Q9tvH
         KbFnaTU4m0W6JKFkpzXPlBu4Q1rlEK/dIBAl7uJ/0Z8Uw8NMhTy3erqcB89bszjKx+EE
         eQ5ITdFZ6CoacOHd9mJwDKFCnxq+wB7SNv8gIeQ1imQMlN+lKyRcQtjkrqA5c9WJM2FL
         ASjuXpWn5Yl3i8UBPiY2/VSEInMMbetUggfMMN5GbbT1Pf6dg1B3vZTDQNglHVn7kZ5w
         ygcsLT54uF0cRQ7KIb2CN01pkZIlfyAO3TMj76uvlBi7/wwrDkgDHtVEDgkg9xwGnfOJ
         t/J 
X-Gm-Message-State: AMCzsaX0pe7kxO+A6fHv3vWCimJkj8b+rl9gqaHYzJIQSzyjlKKovaIT
	mVSn68MHD6dNevfKA1JGjJCUOw==
X-Google-Smtp-Source: AOwi7QAdi5jSjbXdQijN1lTQPz3Wd+vySuZmtvHwyGsXEkYqUjBHAY2I9SL7WRudVW/fLRFWC3sTkQ==
X-Received: by 10.107.180.72 with SMTP id d69mr863627iof.50.1507521735417;
        Sun, 08 Oct 2017 21:02:15 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.46.210 with SMTP id i201ls1029504ita.4.gmail; Sun, 08 Oct
 2017 21:02:14 -0700 (PDT)
X-Received: by 10.107.173.31 with SMTP id w31mr12312379ioe.232.1507521734335;
        Sun, 08 Oct 2017 21:02:14 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1507521734; cv=none;
        d=google.com; s=arc-20160816;
        b=SQolnJ0enOLovkNvNJBjqEJwUFn1i0pFOEFxCgGoe1TC9Hlm6yzbdzROsdp6pNQVYF
         +vEsLRxPi6EEVW2PGNRbXe1u4XEKgv/7kdx2n4wfRvEoKWAajPASQhF7dDrA3S7mBmSf
         OfZH1N/OMpg6IgcdV+iL/1kWbETpkh563h+ie3/PS2SCL2kh20EJzqy9YYvOyx9htpJM
         Vv4A1fxUD9xabg6A6VM7CgpnThiMWi6WiIq0b5HVKP5M+fHepbrtK+QsBBWaEqcCCK/9
         NbLaJCDBBm9mZhqXiFS43qHAVxGdQ8NlAKfyJIZmta3oi/daZsugmyL1BZYF/kebqc0f
         BKhg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:references:in-reply-to:from:subject:date:message-id
         :content-transfer-encoding:mime-version:dkim-signature
         :arc-authentication-results;
        bh=aQhrAJ1Agv79uuSLlH80emEj9pSJLQdyaL0EHON7tro=;
        b=u3Kadh0hzCoFPLankwAdqFX9SqDM4YENRlgxN8ffSRqxvE3iGCFQALvW9Zf7T0i4be
         PQw8uTWOZ1l84Kq/9yfuC7v0dZqCjnDeE8Ph4mvXy8rGLOaSDDoHTOjCp0RtQp4Whv5v
         IKEgY67ZlJ82ca2XFTRSVBwbpzCBMMORZhOEckbOViihXi+6iuxLgaR3WO1nLN0G0Ihy
         ZhOMQn1LIp6PojkIvoXKjKE24N4RabrokzhzjAQlZmqwz1Bx2SdF6vzJ6osnn+HV90ju
         ngf76/eJxuKKNVZb3tSQOxDlpTCeaECURKa9ORZOEq70/LzQEbL+86iTXghfdc9TEy6D
         oI/A==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=EPtcl5Ha;
       spf=pass (google.com: domain of tvaneerd@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tvaneerd@gmail.com;
       dmarc=pass (p=NONE sp=NONE 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 65sor2502230ioy.86.2017.10.08.21.02.14
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Sun, 08 Oct 2017 21:02:14 -0700 (PDT)
Received-SPF: pass (google.com: domain of tvaneerd@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 10.107.136.68 with SMTP id k65mr10840332iod.143.1507521733927;
        Sun, 08 Oct 2017 21:02:13 -0700 (PDT)
Original-Received: from [127.0.0.1] ([2605:8d80:6a5:d2d0:902f:2c1b:5562:401e])
        by smtp.gmail.com with ESMTPSA id e15sm3368727ite.31.2017.10.08.21.02.12
        for <std-proposals@isocpp.org>
        (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
        Sun, 08 Oct 2017 21:02:13 -0700 (PDT)
X-Mailer: BlackBerry Email (10.3.3.2205)
In-Reply-To: <527c448b-b8dd-4877-b63f-b399c167da4d@isocpp.org>
X-Original-Sender: tvaneerd@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=EPtcl5Ha;       spf=pass
 (google.com: domain of tvaneerd@gmail.com designates 209.85.220.41 as
 permitted sender) smtp.mailfrom=tvaneerd@gmail.com;       dmarc=pass (p=NONE
 sp=NONE 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-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:34709
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/34709>

<html><head></head><body lang=3D"en-US" style=3D"background-color: rgb(255,=
 255, 255); line-height: initial;">                                        =
                                              <div style=3D"width: 100%; fo=
nt-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif=
; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, =
255, 255);">How about some examples showing usage?</div>                   =
                                                                           =
                                       <div style=3D"width: 100%; font-size=
: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color=
: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 25=
5);"><br style=3D"display:initial"></div>                                  =
                                                                           =
                                                                           =
           <div style=3D"font-size: initial; font-family: Calibri, 'Slate P=
ro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; =
background-color: rgb(255, 255, 255);">Sent&nbsp;from&nbsp;my&nbsp;BlackBer=
ry&nbsp;portable&nbsp;Babbage&nbsp;Device</div>                            =
                                                                           =
                                                                           =
<table width=3D"100%" style=3D"background-color:white;border-spacing:0px;">=
 <tbody><tr><td colspan=3D"2" style=3D"font-size: initial; text-align: init=
ial; background-color: rgb(255, 255, 255);">                           <div=
 style=3D"border-style: solid none none; border-top-color: rgb(181, 196, 22=
3); border-top-width: 1pt; padding: 3pt 0in 0in; font-family: Tahoma, 'BB A=
lpha Sans', 'Slate Pro'; font-size: 10pt;">  <div><b>From: </b>Mingxin Wang=
</div><div><b>Sent: </b>Sunday, October 8, 2017 10:08 PM</div><div><b>To: <=
/b>ISO C++ Standard - Future Proposals</div><div><b>Reply To: </b>std-propo=
sals@isocpp.org</div><div><b>Subject: </b>[std-proposals] Extensions for Di=
sambiguation Tags</div></div></td></tr></tbody></table><div style=3D"border=
-style: solid none none; border-top-color: rgb(186, 188, 209); border-top-w=
idth: 1pt; font-size: initial; text-align: initial; background-color: rgb(2=
55, 255, 255);"></div><br><div id=3D"_originalContent" style=3D""><div dir=
=3D"ltr">I think the disambiguation tags defined in the standard are not en=
ough to carry every sort of metadata required by function templates, and th=
erefore I suggest the following two additional disambiguation tags:<br><div=
><br></div><div><div class=3D"prettyprint" style=3D"background-color: rgb(2=
50, 250, 250); border-color: rgb(187, 187, 187); border-style: solid; borde=
r-width: 1px; word-wrap: break-word;"><code class=3D"prettyprint"><div clas=
s=3D"subprettyprint"><font color=3D"#660066"><div class=3D"subprettyprint">=
template &lt;class T, T V&gt;</div><div class=3D"subprettyprint">struct in_=
place_arg_t {</div><div class=3D"subprettyprint">&nbsp; explicit in_place_a=
rg_t() =3D default;</div><div class=3D"subprettyprint">};</div><div class=
=3D"subprettyprint">template &lt;class T, T V&gt;</div><div class=3D"subpre=
ttyprint">inline constexpr in_place_arg_t&lt;T, V&gt; in_place_arg {};</div=
><div class=3D"subprettyprint"><br></div><div class=3D"subprettyprint">temp=
late &lt;class T, const T&amp; V&gt;</div><div class=3D"subprettyprint">str=
uct in_place_resource_t {</div><div class=3D"subprettyprint">&nbsp; explici=
t in_place_resource_t() =3D default;</div><div class=3D"subprettyprint">};<=
/div><div class=3D"subprettyprint">template &lt;class T, const T&amp; V&gt;=
</div><div class=3D"subprettyprint">inline constexpr in_place_resource_t&lt=
;T, V&gt; in_place_resource {};</div></font></div></code></div><br><div>Use=
rs are allowed to pass constexpr values by `in_place_arg`, and pass static =
constexpr resources by `in_place_resource`.</div><div><br></div><div>Additi=
onally, I suggest that `in_place_index_t` should be an alias of `in_place_a=
rg_t`:</div></div><div><br></div><div><div class=3D"prettyprint" style=3D"b=
ackground-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187); bord=
er-style: solid; border-width: 1px; word-wrap: break-word;"><code class=3D"=
prettyprint"><div class=3D"subprettyprint"><div class=3D"subprettyprint">te=
mplate &lt;size_t I&gt;</div><div class=3D"subprettyprint">using in_place_i=
ndex_t =3D in_place_arg_t&lt;size_t, I&gt;;</div></div></code></div><br><di=
v>Moreover, comparing to `in_place_arg_t`, I think `integral_constant` is i=
nappropriately named, and there seem to be little necessity to define any m=
ember types or constants in it, because these metadata is already passed by=
 templates. This design is also considered as a solution to another thread =
"<a href=3D"https://groups.google.com/a/isocpp.org/forum/#!topic/std-propos=
als/LANKIrTpaD4">Constexpr function parameters through special conversions<=
/a>" started by Nicol Bolas.</div><div><br></div><div>The motivation of thi=
s design comes from the implementation of another unpublished proposal of m=
ine about polymorphism (I am still working on it), and I found it useful wh=
en recursively calling constexpr functions in non-constexpr ones with custo=
m input.</div><div><br></div><div>I am looking forward to your comments and=
 suggestions!</div><div><br></div><div>Mingxin Wang</div></div></div>

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups "=
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/527c448b-b8dd-4877-b63f-b399c167da4d%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter">https://groups.goo=
gle.com/a/isocpp.org/d/msgid/std-proposals/527c448b-b8dd-4877-b63f-b399c167=
da4d%40isocpp.org</a>.<br>
<br><!--end of _originalContent --></div></body></html>

<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/20171009040212.5161043.12800.37351%40=
gmail.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com=
/a/isocpp.org/d/msgid/std-proposals/20171009040212.5161043.12800.37351%40gm=
ail.com</a>.<br />

.
