220 29468 <0cc57751-f41a-4da2-88e7-a42eb61f57cd@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: "col3435 via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Allowing string literals to match `char...` packs
 in templates
Date: Fri, 18 Nov 2016 08:30:26 -0800 (PST)
Lines: 77
Approved: news@gmane.org
Message-ID: <0cc57751-f41a-4da2-88e7-a42eb61f57cd@isocpp.org>
References: <9de07b5f-f870-4a02-882f-54f9fdd12ffd@isocpp.org>
 <CANh8DEm_8ngPVZyMAP4GU8nbvgiD2XxBrLT0M1Pk94m8+tQrug@mail.gmail.com>
 <d9433fac-152f-4515-b518-985a78768c03@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_6956_1657314984.1479486626432"
X-Trace: blaine.gmane.org 1479486631 23885 195.159.176.226 (18 Nov 2016 16:30:31 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 18 Nov 2016 16:30:31 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCS5LL55TMARBI6ZXTAQKGQEO3SXC3Y@isocpp.org Fri Nov 18 17:30:26 2016
Return-path: <std-proposals+bncBCS5LL55TMARBI6ZXTAQKGQEO3SXC3Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ua0-f198.google.com ([209.85.217.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCS5LL55TMARBI6ZXTAQKGQEO3SXC3Y@isocpp.org>)
	id 1c7m3V-00058Z-TH
	for gclcip-std-proposals@m.gmane.org; Fri, 18 Nov 2016 17:30:26 +0100
Original-Received: by mail-ua0-f198.google.com with SMTP id 34sf167111320uac.6
        for <gclcip-std-proposals@m.gmane.org>; Fri, 18 Nov 2016 08:30:28 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to: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=HrcDhc/m2poTFZ3qpiiGcutQ5nK7+UZGiT064xcPZFc=;
        b=shWgVVcQx2jcuPFTMoU6E/Ujqg9KrlSExX71k319tVCXrP3r4J+hrn0+hXb/MPzQY+
         cS6Cr1olaFYfznvgV9SABq5omMvvyJCdSAArNE3sgX8z6ysyISTHjKtATxIMSNR1xvBb
         2Z2JkGnJ2T6b4rQV+LvzlqlXI2Nm+0GDBrxREhnx4NI5LK5mUsOddTyMSiB/vSnNE03f
         5Ocz/5L38OecUVIDwij0YaRuE3Hp0MaonW/EgGMqdWqK58lkZpSL7oFJVQSrF7aMX8jc
         rvjVNV4t2AgVf4sZe19jONsnHB5AqqcdpXw5LbX3DoPhqqNeje5ia83h96bL//8u3Ip2
         4atw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to: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=HrcDhc/m2poTFZ3qpiiGcutQ5nK7+UZGiT064xcPZFc=;
        b=k0LowwkvyBpbu5IWDWhq5fl6cNPzkXXOlbPym22srIzsWlIE2O5j4PkmDLuTyVflth
         9DNrX5iGUqwykw75l8RsulBhLSY5pyJgzFInkOLDT2vk1e49Ri+CMvICECldIxWxnitw
         64ytKgDmjikQYM9iPXsDa13aOo4hgmgl2Wki7y0JrnfThCZ7FS3RX/J3J4i0rwE56KqW
         mxfjEBELGHsFBDrP+YDdJ6Gw5xDH+2dNLuPqj2xNk4QSxnjQbZ+p9egAdPeoxBXQpLyc
         hzYl1r8ouWOZ8SxNuB820N6WhPiMTJFBy4Q5cGDYratcwfCf0yPWlVeKJAjcFkPt8vEX
         Lb0g==
X-Gm-Message-State: AKaTC02T/UYmKZYai/tnZWK2mNKSzQjKvkEHuLseOTLqVpeJIzLjjl/s7GX7lElifyqtZg==
X-Received: by 10.31.130.129 with SMTP id e123mr67076vkd.29.1479486627741;
        Fri, 18 Nov 2016 08:30:27 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.26.102 with SMTP id u35ls7389349otu.4.gmail; Fri, 18 Nov
 2016 08:30:26 -0800 (PST)
X-Received: by 10.157.39.129 with SMTP id c1mr54442otb.15.1479486626957;
        Fri, 18 Nov 2016 08:30:26 -0800 (PST)
In-Reply-To: <d9433fac-152f-4515-b518-985a78768c03@isocpp.org>
X-Original-Sender: col3435@yahoo.co.uk
X-Original-From: col3435@yahoo.co.uk
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:29468
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/29468>

------=_Part_6956_1657314984.1479486626432
Content-Type: multipart/alternative; 
	boundary="----=_Part_6957_126519399.1479486626432"

------=_Part_6957_126519399.1479486626432
Content-Type: text/plain; charset=UTF-8

How about allowing literal types as template arguments if they have
defaulted == and != operators (and this condition also applies recursively
to all of their members). It does look fairly likely that we will get 
default ==
in the language in the near future. Once we have that, it would provide
a natural way to express which types are unproblematic for use as
template arguments.

This would be more than good enough to get us arrays of characters.

On Thursday, 17 November 2016 05:28:26 UTC, Louis Dionne wrote:
>
> So on Saturday, we tried looking into passing arrays as template 
> arguments, but
> that becomes messy because arrays are already supported, but they decay to
> pointers so we'd need to support a new syntax. We then tried passing 
> std::array,
> but doing this cleanly would require passing arbitrary literal types as 
> template
> arguments, which is also non-trivial of a change.
>

-- 
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/0cc57751-f41a-4da2-88e7-a42eb61f57cd%40isocpp.org.

------=_Part_6957_126519399.1479486626432
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">How about allowing literal types as template arguments if =
they have<div>defaulted =3D=3D and !=3D operators (and this condition also =
applies recursively</div><div>to all of their members). It does look fairly=
 likely that we will get default =3D=3D</div><div>in the language in the ne=
ar future. Once we have that, it would provide</div><div>a natural way to e=
xpress which types are unproblematic for use as</div><div>template argument=
s.</div><div><br></div><div>This would be more than good enough to get us a=
rrays of characters.</div><div><br>On Thursday, 17 November 2016 05:28:26 U=
TC, Louis Dionne  wrote:<blockquote class=3D"gmail_quote" style=3D"margin: =
0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div d=
ir=3D"ltr"><div>So on Saturday, we tried looking into passing arrays as tem=
plate arguments, but</div><div>that becomes messy because arrays are alread=
y supported, but they decay to</div><div>pointers so we&#39;d need to suppo=
rt a new syntax. We then tried passing std::array,</div><div>but doing this=
 cleanly would require passing arbitrary literal types as template</div><di=
v>arguments, which is also non-trivial of a change.</div></div></blockquote=
></div></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/0cc57751-f41a-4da2-88e7-a42eb61f57cd%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/0cc57751-f41a-4da2-88e7-a42eb61f57cd=
%40isocpp.org</a>.<br />

------=_Part_6957_126519399.1479486626432--

------=_Part_6956_1657314984.1479486626432--

.
