220 36026 <0f7bbb29-e28c-4600-a2f6-fba0a80fec3d@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: inkwizytoryankes@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Make aliased templates first class citizens
Date: Tue, 19 Dec 2017 06:32:05 -0800 (PST)
Lines: 231
Approved: news@gmane.org
Message-ID: <0f7bbb29-e28c-4600-a2f6-fba0a80fec3d@isocpp.org>
References: <8e4dd67b-e929-4f83-8f68-4a7ebd20a4e3@isocpp.org>
 <7eb526d4-c557-443c-a7d5-235dc8e44926@isocpp.org>
 <6d5434aa-a3bd-460f-bdbd-3db00772768a@isocpp.org>
 <90bc6ae9-54a4-4fe5-b4ee-a32db51ca820@isocpp.org>
 <a366da24-92ff-4011-99a9-4aca60390142@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_7884_1189233143.1513693925186"
X-Trace: blaine.gmane.org 1513693809 26624 195.159.176.226 (19 Dec 2017 14:30:09 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 19 Dec 2017 14:30:09 +0000 (UTC)
Cc: adrian.hawryluk@gmail.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDDLTAGNTIBBBZWF4TIQKGQELBP5VUQ@isocpp.org Tue Dec 19 15:30:05 2017
Return-path: <std-proposals+bncBDDLTAGNTIBBBZWF4TIQKGQELBP5VUQ@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+bncBDDLTAGNTIBBBZWF4TIQKGQELBP5VUQ@isocpp.org>)
	id 1eRIuD-0006j2-Ay
	for gclcip-std-proposals@m.gmane.org; Tue, 19 Dec 2017 15:30:05 +0100
Original-Received: by mail-ua0-f198.google.com with SMTP id j20sf11857018uag.4
        for <gclcip-std-proposals@m.gmane.org>; Tue, 19 Dec 2017 06:32:08 -0800 (PST)
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=q3YLHqGxmuEizjIUhJEvsLjEOO5t6Po+uS0r8jlDJKo=;
        b=jNVrKM8wdneKKP2YPlVyCza6bE+mNp7j6TOuKEc7T/aDSUhHSdoGhTKlmLGIwGNrUl
         qjw/uFLqKEY/l2uiikoR9cz2DZ4P2SfaTPMgP/tysUTrdPmpNQHJjxznDB8FZLXKrLSb
         a9/LtKqC3CqZ0rZa67rtQxQmQpM25WIXBVP7XhjHOrei0iLiQOBa6zEjsrKEILih+pTt
         LpeDmVA/Of1JC837aJKNYR1oDxyOXVqUWClSO2tYBfDU/kmwmarkk+Cv2+rfyvxDzImk
         DQdAueQHzSnRmq0Xj7XlTjgjdcPuchgiJ0oPHgCH7jt++8EDAAgTXHRHGbzZcACefxGy
         JESA==
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=q3YLHqGxmuEizjIUhJEvsLjEOO5t6Po+uS0r8jlDJKo=;
        b=TA3Jb7cZd5GULGLF5Qj874sjy8lJfiCJQ+dLJcSogjOTPmm9vnleFKKk6KUQq3d95m
         25HEvKbsWJiSx5XxVlp5fKw+XJkKeMZxyFdTdvsbXuOvXCarRSxSdxI9P8LK4gHF/HCH
         rNHgD6Gtbqe2aU7oI9v6LmrXQ5imWZF1XHe94xPjEE3QjdMLub5CqWzuGRN7eP9S+AvQ
         xplyD+Il6e1Y8Y5U11XqG+AVJyS3OXez9YhoyuW4991KNK+uBrj7yGIdZhmGzpVtXJxZ
         +pcBkqlRloVQ98HvpERzNZPGYpl+Cz2Z1Mk/3TiQXLzAO4QoFe1nnji/V2VAcxAoDGgU
         8h4g==
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=q3YLHqGxmuEizjIUhJEvsLjEOO5t6Po+uS0r8jlDJKo=;
        b=s7FrOJpoQFCGp+BMzdMqY5W6Urznr7T11wC2wNuaZb6LdpWiy91lH/wwQmkknT2gsW
         /DjdAlj+iSHGx64v6lXPoiC6txJjZ9bOIwa5dYOwRweJLVqqi+7m0z0WHynKR3yLJ8N3
         2sqGicFo2oADHAsF4Ly68YpTEzZGWWkPUgq47A81JblQjXIG/eRmKYEYC6VpylJAAbG2
         MCJXgAPn1aG3DnhO/ATI9O66maPPZ+2liXzlMkjj62eRplt8T+Oiff5P7HouoVf9m/L5
         CmVhjV7zmw45DkhG79Vog73T63zPaT0qiEGGrDI8BiXjQ2XwRCtv9fY8wbtV8ednHprh
         f2bw==
X-Gm-Message-State: AKGB3mI0cNCjK9ZTnDGDcH15tfgtLCTNQsFpuJ3L/rKn1J7jONyv8GlQ
	w4qrSh1WTmHtf92zvQOOEW6HGg==
X-Google-Smtp-Source: ACJfBotQpmLOpE233o783Ib0MVY0C6q8lj33vsZ4XeyHqm5PrrVc1VKXU+i5itzdJ4tP56rPzYVuCA==
X-Received: by 10.31.94.202 with SMTP id s193mr1521744vkb.77.1513693927566;
        Tue, 19 Dec 2017 06:32:07 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.31.171.19 with SMTP id u19ls389089vke.9.gmail; Tue, 19 Dec
 2017 06:32:05 -0800 (PST)
X-Received: by 10.31.96.72 with SMTP id u69mr336947vkb.11.1513693925730;
        Tue, 19 Dec 2017 06:32:05 -0800 (PST)
In-Reply-To: <a366da24-92ff-4011-99a9-4aca60390142@isocpp.org>
X-Original-Sender: inkwizytoryankes@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: 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:36026
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/36026>

------=_Part_7884_1189233143.1513693925186
Content-Type: multipart/alternative; 
	boundary="----=_Part_7885_1134339811.1513693925187"

------=_Part_7885_1134339811.1513693925187
Content-Type: text/plain; charset="UTF-8"



On Tuesday, December 19, 2017 at 2:47:55 PM UTC+1, Jack Adrian Zappa wrote:
>
> On Monday, December 18, 2017 at 3:56:37 PM UTC-5, Marcin Jaczewski wrote:
>>
>>
>>
>> On Monday, December 18, 2017 at 6:28:12 AM UTC+1, adrian....@gmail.com 
>> wrote:
>>>
>>> On Sunday, December 17, 2017 at 8:18:29 PM UTC-5, Marcin Jaczewski wrote:
>>>>
>>>>
>>>> Right now I see only one problem with this:
>>>> template<typename A>
>>>> using B = typename A::template template temp<1><2>;
>>>> //or
>>>> template<typename A>
>>>> using C = template A::template temp<1>; //this return template not 
>>>> type, this could be problematic when C++20 remove options for different 
>>>> `using`
>>>> //or
>>>> template<typename A>
>>>> using D = template template A::temp;
>>>> You will probably need something like this to allow proper handle of 
>>>> `<` and `>` by compiler in dependent context.
>>>>
>>>
>>> I'm not exactly sure what you mean.  So, these are potential ways to 
>>> tell the compiler what it should be seeing?  temp is a binary 
>>> operator?  What is A?  Could you please give more context or explain in 
>>> more detail what you are attempting to say?
>>>
>>
>> What is `temp`? This is good question that your proposal should answer 
>> because it's dependent name on template parameter `A`. If we implements 
>> your proposition how you will access it if it is in dependent context?
>> Right now we have way to distinguish between objects, types and 
>> templates, now with your proposal we will need new way to support your 
>> first class aliases.
>>
>
> Ah, sorry.  Not sure how I misread that.  If I understand the current 
> parsing of C++, I think your 1st one is most appropriate.  Also, could you 
> expand on what you mean by your 2nd item being possibly problematic in 
> c++20? 
>
 
Last one is similar in functionality to your declaration:
template<int I>
template<int J>
template<typename A>
using B = typename A::template template temp<I><J>;

template<typename A>
using C = template template A::temp;

One difference is that in my case we would not need what template 
parameters are needed for `temp`

For 2nd I referring to 
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0634r0.pdf now 
depending what syntax you will want use this proposal will or will not 
affect it. This it simply thing to consider when you are choosing syntax 
for this proposal.

-- 
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/0f7bbb29-e28c-4600-a2f6-fba0a80fec3d%40isocpp.org.

------=_Part_7885_1134339811.1513693925187
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Tuesday, December 19, 2017 at 2:47:55 PM UTC+1,=
 Jack Adrian Zappa wrote:<blockquote class=3D"gmail_quote" style=3D"margin:=
 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div =
dir=3D"ltr">On Monday, December 18, 2017 at 3:56:37 PM UTC-5, Marcin Jaczew=
ski wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0=
..8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><br><br>=
On Monday, December 18, 2017 at 6:28:12 AM UTC+1, <a>adrian....@gmail.com</=
a> wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.=
8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">On Sunday=
, December 17, 2017 at 8:18:29 PM UTC-5, Marcin Jaczewski wrote:<blockquote=
 class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px =
#ccc solid;padding-left:1ex"><div dir=3D"ltr"><br>Right now I see only one =
problem with this:<br><div style=3D"background-color:rgb(250,250,250);borde=
r-color:rgb(187,187,187);border-style:solid;border-width:1px"><code><div><s=
pan style=3D"color:#008">template</span><span style=3D"color:#660">&lt;</sp=
an><span style=3D"color:#008">typename</span><span style=3D"color:#000"> A<=
/span><span style=3D"color:#660">&gt;</span><span style=3D"color:#000"><br>=
</span><span style=3D"color:#008">using</span><span style=3D"color:#000"> B=
 </span><span style=3D"color:#660">=3D</span><span style=3D"color:#000"> </=
span><span style=3D"color:#008">typename</span><span style=3D"color:#000"> =
A</span><span style=3D"color:#660">::</span><span style=3D"color:#008">temp=
late</span><span style=3D"color:#000"> </span><span style=3D"color:#008">te=
mplate</span><span style=3D"color:#000"> temp</span><span style=3D"color:#6=
60">&lt;</span><span style=3D"color:#066">1</span><span style=3D"color:#660=
">&gt;&lt;</span><span style=3D"color:#066">2</span><span style=3D"color:#6=
60">&gt;;</span><span style=3D"color:#000"><br></span><span style=3D"color:=
#800">//or</span><span style=3D"color:#000"><br></span><span style=3D"color=
:#008">template</span><span style=3D"color:#660">&lt;</span><span style=3D"=
color:#008">typename</span><span style=3D"color:#000"> A</span><span style=
=3D"color:#660">&gt;</span><span style=3D"color:#000"><br></span><span styl=
e=3D"color:#008">using</span><span style=3D"color:#000"> C </span><span sty=
le=3D"color:#660">=3D</span><span style=3D"color:#000"> </span><span style=
=3D"color:#008">template</span><span style=3D"color:#000"> A</span><span st=
yle=3D"color:#660">::</span><span style=3D"color:#008">template</span><span=
 style=3D"color:#000"> temp</span><span style=3D"color:#660">&lt;</span><sp=
an style=3D"color:#066">1</span><span style=3D"color:#660">&gt;;</span><spa=
n style=3D"color:#000"> </span><span style=3D"color:#800">//this return tem=
plate not type, this could be problematic when C++20 remove options for dif=
ferent `using`</span><span style=3D"color:#000"><br></span><span style=3D"c=
olor:#800">//or</span><span style=3D"color:#000"><br></span><span style=3D"=
color:#008">template</span><span style=3D"color:#660">&lt;</span><span styl=
e=3D"color:#008">typename</span><span style=3D"color:#000"> A</span><span s=
tyle=3D"color:#660">&gt;</span><span style=3D"color:#000"><br></span><span =
style=3D"color:#008">using</span><span style=3D"color:#000"> D </span><span=
 style=3D"color:#660">=3D</span><span style=3D"color:#000"> </span><span st=
yle=3D"color:#008">template</span><span style=3D"color:#000"> </span><span =
style=3D"color:#008">template</span><span style=3D"color:#000"> A</span><sp=
an style=3D"color:#660">::</span><span style=3D"color:#000">temp</span><spa=
n style=3D"color:#660">;</span><span style=3D"color:#000"><br></span></div>=
</code></div>You will probably need something like this to allow proper han=
dle of `&lt;` and `&gt;` by compiler in dependent context.<br></div></block=
quote><div><br></div><div>I&#39;m not exactly sure what you mean.=C2=A0=C2=
=A0So, these are potential ways to tell the compiler what it should be seei=
ng?=C2=A0 <font face=3D"courier new, monospace">temp</font> is a binary ope=
rator?=C2=A0 What is <font face=3D"courier new, monospace">A</font>?=C2=A0 =
Could you please give more context or explain in more detail what you are a=
ttempting to say?</div></div></blockquote><br>What is `temp`? This is good =
question that your proposal should answer because it&#39;s dependent name o=
n template parameter `A`. If we implements your proposition how you will ac=
cess it if it is in dependent context?<br>Right now we have way to <span la=
ng=3D"en"><span>distinguish </span></span>between objects, types and templa=
tes, now with your proposal we will need new way to support your first clas=
s aliases.<br></div></blockquote><div><br></div><div>Ah, sorry.=C2=A0 Not s=
ure how I misread that.=C2=A0 If I understand the current parsing of C++, I=
 think your 1st one is most appropriate.=C2=A0 Also, could you expand on wh=
at you mean by your 2nd item being possibly problematic in c++20?=C2=A0</di=
v></div></blockquote><div>=C2=A0</div><div>Last one is similar in functiona=
lity to your declaration:</div><div><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"subprettyprint"><span style=3D"color: #008;"=
 class=3D"styled-by-prettify">template</span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">&lt;</span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">int</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"> I</span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">&gt;</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"><br></span><span style=3D"color: #008;" class=3D"styled-by-prettify">tem=
plate</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;<=
/span><span style=3D"color: #008;" class=3D"styled-by-prettify">int</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> J</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">&gt;</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"color:=
 #008;" class=3D"styled-by-prettify">template</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #008;" =
class=3D"styled-by-prettify">typename</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> A</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">&gt;</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"><br></span><span style=3D"color: #008;" class=3D"styled-by-pre=
ttify">using</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
"> B </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><spa=
n style=3D"color: #008;" class=3D"styled-by-prettify">typename</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> A</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">::</span><span style=3D"color: =
#008;" class=3D"styled-by-prettify">template</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" clas=
s=3D"styled-by-prettify">template</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> temp</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">&lt;</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify">I</span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">&gt;&lt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
">J</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&gt;;</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br><br></sp=
an><span style=3D"color: #008;" class=3D"styled-by-prettify">template</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span=
 style=3D"color: #008;" class=3D"styled-by-prettify">typename</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"> A</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">&gt;</span><span style=3D"color:=
 #000;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #008;=
" class=3D"styled-by-prettify">using</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify"> C </span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">=3D</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettif=
y">template</span><span style=3D"color: #000;" class=3D"styled-by-prettify"=
> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">template=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> A</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">::</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify">temp</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">;</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"><br><br></span></div></code></div>One dif=
ference is that in my case we would not need what template parameters are n=
eeded for `temp`</div><div><br></div><div>For 2nd I referring to http://www=
..open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0634r0.pdf now depending wha=
t syntax you will want use this proposal will or will not affect it. This i=
t simply thing to consider when you are choosing syntax for this proposal.<=
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/0f7bbb29-e28c-4600-a2f6-fba0a80fec3d%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/0f7bbb29-e28c-4600-a2f6-fba0a80fec3d=
%40isocpp.org</a>.<br />

------=_Part_7885_1134339811.1513693925187--

------=_Part_7884_1189233143.1513693925186--

.
