220 33565 <03d0948e-506b-4e0b-b5e0-b255d3698cd5@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Nicol Bolas <jmckesson@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Add type alias that mirrors given type
Date: Thu, 3 Aug 2017 06:54:29 -0700 (PDT)
Lines: 100
Approved: news@gmane.org
Message-ID: <03d0948e-506b-4e0b-b5e0-b255d3698cd5@isocpp.org>
References: <20f365ce-2a24-4576-894f-923e7b9cd76e@isocpp.org>
 <edbf0c37-4672-0c79-d95b-331b3812ba1c@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_5451_1861794337.1501768469980"
X-Trace: blaine.gmane.org 1501768471 7218 195.159.176.226 (3 Aug 2017 13:54:31 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 3 Aug 2017 13:54:31 +0000 (UTC)
Cc: antonio@perezexcelsior.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCEKFTV6ZUMBBFWWRTGAKGQEZZLPZFY@isocpp.org Thu Aug 03 15:54:27 2017
Return-path: <std-proposals+bncBCEKFTV6ZUMBBFWWRTGAKGQEZZLPZFY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-it0-f72.google.com ([209.85.214.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCEKFTV6ZUMBBFWWRTGAKGQEZZLPZFY@isocpp.org>)
	id 1ddGa1-0001YJ-RG
	for gclcip-std-proposals@m.gmane.org; Thu, 03 Aug 2017 15:54:25 +0200
Original-Received: by mail-it0-f72.google.com with SMTP id o19sf15264995ito.5
        for <gclcip-std-proposals@m.gmane.org>; Thu, 03 Aug 2017 06:54:32 -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:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=NskTZ/w4HVWtoG4po3k9rzwGgc6bKnQooQ7jNW+G8SM=;
        b=g6TQ7qSd1BCOg7xa/is1qb8cL7f6EK7eBNzHxQbL50SHJUsTkmxJWmL/DK8Sj+//jI
         M+yEbnStYzGs8ooBCZM7T1P2m6u4r8LqjIdkVgjqFJwcjd+dKGMRw/q6VZY0KXMoHoHV
         jUESLyJJVZb+ard33j1o8mSlyjtvnkBRaYtlmGhzUiqXlA53FNpFaqJXx4KFR+cQ1U5h
         4LjAVO8OaPLyRhKDF9mHzl4iCUv9s55XqFy2mJgiXY9C8aYrXEI4j5Zq9stljbRUCCKM
         zeDSfRMFy01Dn0mef/k5gPNTKqFyLTmCoSfl8si1kuC8dycsVE2v3dN87MGYGzsYItOz
         i4Zw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:cc:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=NskTZ/w4HVWtoG4po3k9rzwGgc6bKnQooQ7jNW+G8SM=;
        b=tNXnXsEuoUhXr9+NWI1q4pq+rHNPH/1AW+tPhYbc/5XgE9qOGTZYz3yaJ+ZGAKXXqD
         yfKECAsy+YXYiViSO6CtJaiJFPu3xK/qE79Mzef9xikG9eSHjnuc6y7SCtKtBMEWzdA2
         WXxV3ZAyBQcaKZAG3S4CGT4dVUlte9pgfNoRwyhNkmlH9nSCudJY6vDdzHoUtduZL0la
         4UpHseofl4+ScQRXUj4SUX5KGziMeBMuGlLA0/wukyN1Z/YA/s/gDbIHrM1y17nlqckK
         TMhHqh05hQ3IAiZrXe98/416epTKow/n+3PLODkfmqhYNBLzpMnf0EQyl3yfe+vm2bW3
         incg==
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=NskTZ/w4HVWtoG4po3k9rzwGgc6bKnQooQ7jNW+G8SM=;
        b=CAwQXFUddU1/8H2mEWXCcg+amYAj+SCy5WoGPf0aFGrvjFYlqZj2z7Lfm+Pw18vL2G
         MRxQ8KwG7JOqDWOBBCRXDXFspsV5emaxH5nRZcddM0icLGW7w/AEehDJxhUvuDanCEsq
         yiz9yDgZqv9kE4P3jxnEpwtK0KlHgy3urJfURIOQKxQvH3LI128Nwt1Q11Axuhedbt+y
         SejY2qxU+zRHDhHapODrj5iJlwrJ80xjj+c9Q/R2GjGqkJ1FlBumhcAba3ZMJLp6l954
         rtlpsjkdL1sIJhZZcrO4J3E/PrOtsQR6Eha0nUkgg/kTEwG3OrNnbpvDX2CZ4V6YLvyH
         SbeQ==
X-Gm-Message-State: AHYfb5ioIClYG4imLtA8h3U0Wf0Qxn2d3mBh6PeXiC+tuue+CUN0HvPE
	DE8PB8mbbYAzb6U4
X-Received: by 10.107.170.38 with SMTP id t38mr1074468ioe.107.1501768471713;
        Thu, 03 Aug 2017 06:54:31 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.128.165 with SMTP id k37ls1613065ioi.37.gmail; Thu, 03 Aug
 2017 06:54:30 -0700 (PDT)
X-Received: by 10.31.160.13 with SMTP id j13mr7486vke.25.1501768470386;
        Thu, 03 Aug 2017 06:54:30 -0700 (PDT)
In-Reply-To: <edbf0c37-4672-0c79-d95b-331b3812ba1c@gmail.com>
X-Original-Sender: jmckesson@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:33565
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33565>

------=_Part_5451_1861794337.1501768469980
Content-Type: multipart/alternative; 
	boundary="----=_Part_5452_2039268355.1501768469980"

------=_Part_5452_2039268355.1501768469980
Content-Type: text/plain; charset="UTF-8"

On Thursday, August 3, 2017 at 9:35:36 AM UTC-4, Matthew Woehlke wrote:
>
> On 2017-08-02 15:27, Antonio Perez wrote: 
> > I propose that a type alias which simply returns the given type be added 
> to 
> > the standard library for the purpose of working with types whose syntax 
> is 
> > problematic. 
> > 
> > *What's the use for this?*As an example usage, here is a print function 
> > that prints an array of things: 
> > > template<class T, size_t n> void print(std::typemirror<T[n]>& arr) 
>
> Um... 
>
>   template <typename T, size_t N> 
>   void print(T (&arr)[N]) 
>
> ...? 
>
> I don't see a motivating use case here...
>

I think the motivation here is that that syntax looks *terrible* and quite 
a few people have no idea how to type that. The type of the object `arr` 
references is `T[N]`, so why isn't it on the left where types go? Every 
time I have to write something like that, I have to look up how to do it 
properly.

Granted, since I got hold of gsl::span, I haven't had need to take such a 
horrible type anymore.

-- 
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/03d0948e-506b-4e0b-b5e0-b255d3698cd5%40isocpp.org.

------=_Part_5452_2039268355.1501768469980
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Thursday, August 3, 2017 at 9:35:36 AM UTC-4, Matthew W=
oehlke wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-le=
ft: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">On 2017-08-02 15:=
27, Antonio Perez wrote:
<br>&gt; I propose that a type alias which simply returns the given type be=
 added to=20
<br>&gt; the standard library for the purpose of working with types whose s=
yntax is=20
<br>&gt; problematic.
<br>&gt;=20
<br>&gt; *What&#39;s the use for this?*As an example usage, here is a print=
 function=20
<br>&gt; that prints an array of things:
<br>&gt; &gt; template&lt;class T, size_t n&gt; void print(std::typemirror&=
lt;T[n]&gt;&amp; arr)
<br>
<br>Um...
<br>
<br>=C2=A0 template &lt;typename T, size_t N&gt;
<br>=C2=A0 void print(T (&amp;arr)[N])
<br>
<br>...?
<br>
<br>I don&#39;t see a motivating use case here...<br></blockquote><div><br>=
I think the motivation here is that that syntax looks <i>terrible</i> and q=
uite a few people have no idea how to type that. The type of the object `ar=
r` references is `T[N]`, so why isn&#39;t it on the left where types go? Ev=
ery time I have to write something like that, I have to look up how to do i=
t properly.<br><br>Granted, since I got hold of gsl::span, I haven&#39;t ha=
d need to take such a horrible type anymore.<br></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/03d0948e-506b-4e0b-b5e0-b255d3698cd5%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/03d0948e-506b-4e0b-b5e0-b255d3698cd5=
%40isocpp.org</a>.<br />

------=_Part_5452_2039268355.1501768469980--

------=_Part_5451_1861794337.1501768469980--

.
