220 36017 <a366da24-92ff-4011-99a9-4aca60390142@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Jack Adrian Zappa <adrian.hawryluk@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Make aliased templates first class citizens
Date: Tue, 19 Dec 2017 05:47:55 -0800 (PST)
Lines: 146
Approved: news@gmane.org
Message-ID: <a366da24-92ff-4011-99a9-4aca60390142@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>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_28421_793900392.1513691275161"
X-Trace: blaine.gmane.org 1513691159 11989 195.159.176.226 (19 Dec 2017 13:45:59 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 19 Dec 2017 13:45:59 +0000 (UTC)
Cc: adrian.hawryluk@gmail.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCULLOGNUQIRBDFR4TIQKGQEFUGENFQ@isocpp.org Tue Dec 19 14:45:55 2017
Return-path: <std-proposals+bncBCULLOGNUQIRBDFR4TIQKGQEFUGENFQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vk0-f71.google.com ([209.85.213.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCULLOGNUQIRBDFR4TIQKGQEFUGENFQ@isocpp.org>)
	id 1eRIDT-0002ph-5v
	for gclcip-std-proposals@m.gmane.org; Tue, 19 Dec 2017 14:45:55 +0100
Original-Received: by mail-vk0-f71.google.com with SMTP id w204sf9707185vke.1
        for <gclcip-std-proposals@m.gmane.org>; Tue, 19 Dec 2017 05:47:57 -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=jj1yFp7sSZduhaaJ2KYNTTyDE1Q/5hncu2zPUGTPTkc=;
        b=S74MJQugKwNHcI2dA1X4zmfk0x2Zqc8SEn7yFCpjH/UHM9T0/1fIfOlUsfP742kHMf
         77OZKgFYZ/ldTEfJ/GF+MrlbZrm5ocE3DYL4l5sJHEuGFryVKPUO9rF3PKF5szM0y4qe
         cjeh5n6w/8nP0FzxlF6McWtZFsx2aN8Ps4RkFFkUaZQTY0sOifSH8kwlEATGcP2vAkXD
         BevBie7bkkI2Jfe0BovfoStAXdp8PqTZM2GgihN4YbJiWW/WyLYwCm2oFK81rRf+9EYr
         66RmRuMno3yjyRZnCu3tEaFl4dEjr92XCdTdxWGKV0Rb0uC61sYqDvtfV2yQ54uAsT2s
         wUSg==
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=jj1yFp7sSZduhaaJ2KYNTTyDE1Q/5hncu2zPUGTPTkc=;
        b=PJQtjM8o6WN0mixazxXGqExOZOVtOeXfDGwKKF9kRYnQeXE3PnPW4dwCySZHp8Nv/8
         hGJGZD+/oEAQ67YtAHp8Xfewg4GT7z1KC+7jgCsv7gDUNYrrKknyZtSuREOK0aIwwI7J
         YRSHP7wsPKktouXXD85I7fpKFJlNHqMbuh9GBVJl/gPyAoIS7KrsVxkSTt6oieg5R8Qp
         La8o3ZJZqsvpNuW9tgb6f7/8HBshncUuTg7cH+tQSIvdr3Zc8l0WRW2knTY9Ns4EmXpr
         nmu1w2csipG6mkKtDroIauQ+VlZOLB21qblCMJ+hgbczPEEwT58DAGdXjZuXmCVT1/St
         7pEQ==
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=jj1yFp7sSZduhaaJ2KYNTTyDE1Q/5hncu2zPUGTPTkc=;
        b=oB7aLYDLNBKLOe/5rfq5bAGksfzuzwWUW5DmwoisuANDcNG5QbhevL9tUXvLxue3S1
         XclRECFjviAzBFjNrg2q7+x1Uyl8VdjxPe8BY8q4ebN/KRCZjIZTXRcpNFL5f08ij5M7
         loF3djtZAEM+/8FIrWdM8nIBgqJyCOqR2010c9HLP/xRFmO8W1cKC/nlEnbq831aufbB
         DiJc1wiYksNyc+RwQGB38GjUifsUWpzPf9wtxG4WcSmF7hYyrdSnt320QL9qB+phKuZn
         7AXQcY2DMzDcpakzToHrreRni4X33rBIhgvq0WGIaIdGUv9OD3WRU3LAkUbDlo7NWJdX
         ZWZg==
X-Gm-Message-State: AKGB3mLfg3whsYdgZo+oNiY9SXNjG2N9gbBQYiiA9sbVpt5OFcaGYWFb
	8krJHI8eh5I6Kck6Ky6y2sKBvA==
X-Google-Smtp-Source: ACJfBoumbevzZmxnv/HtZPQIkZ2nQqVCcVkVwD6xqUJFA5q07At8C34yPri77zGRyzXyA11J28nNjA==
X-Received: by 10.31.5.4 with SMTP id 4mr1552568vkf.103.1513691277294;
        Tue, 19 Dec 2017 05:47:57 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.31.174.76 with SMTP id x73ls5494633vke.21.gmail; Tue, 19 Dec
 2017 05:47:56 -0800 (PST)
X-Received: by 10.31.178.196 with SMTP id b187mr328233vkf.8.1513691275743;
        Tue, 19 Dec 2017 05:47:55 -0800 (PST)
In-Reply-To: <90bc6ae9-54a4-4fe5-b4ee-a32db51ca820@isocpp.org>
X-Original-Sender: adrian.hawryluk@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:36017
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/36017>

------=_Part_28421_793900392.1513691275161
Content-Type: multipart/alternative; 
	boundary="----=_Part_28422_2016807006.1513691275162"

------=_Part_28422_2016807006.1513691275162
Content-Type: text/plain; charset="UTF-8"

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? 

-- 
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/a366da24-92ff-4011-99a9-4aca60390142%40isocpp.org.

------=_Part_28422_2016807006.1513691275162
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Monday, December 18, 2017 at 3:56:37 PM UTC-5, Marcin J=
aczewski 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....@g=
mail.com</a> wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0;marg=
in-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);border-color:rgb(187,187,187);border-style:solid;border-width:1px"><co=
de><div><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 style=3D"color:#008">using</span><span style=3D"colo=
r:#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"col=
or:#000"> A</span><span style=3D"color:#660">::</span><span style=3D"color:=
#008">template</span><span style=3D"color:#000"> </span><span style=3D"colo=
r:#008">template</span><span style=3D"color:#000"> temp</span><span style=
=3D"color:#660">&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 sty=
le=3D"color:#660">&gt;;</span><span style=3D"color:#000"><br></span><span s=
tyle=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</spa=
n><span style=3D"color:#660">&gt;</span><span style=3D"color:#000"><br></sp=
an><span style=3D"color:#008">using</span><span style=3D"color:#000"> C </s=
pan><span style=3D"color:#660">=3D</span><span style=3D"color:#000"> </span=
><span style=3D"color:#008">template</span><span style=3D"color:#000"> A</s=
pan><span style=3D"color:#660">::</span><span style=3D"color:#008">template=
</span><span style=3D"color:#000"> temp</span><span style=3D"color:#660">&l=
t;</span><span style=3D"color:#066">1</span><span style=3D"color:#660">&gt;=
;</span><span style=3D"color:#000"> </span><span style=3D"color:#800">//thi=
s return template not type, this could be problematic when C++20 remove opt=
ions for different `using`</span><span style=3D"color:#000"><br></span><spa=
n style=3D"color:#800">//or</span><span style=3D"color:#000"><br></span><sp=
an style=3D"color:#008">template</span><span style=3D"color:#660">&lt;</spa=
n><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"> D =
</span><span style=3D"color:#660">=3D</span><span style=3D"color:#000"> </s=
pan><span style=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><span style=3D"color:#660">::</span><span style=3D"color:#000">tem=
p</span><span style=3D"color:#660">;</span><span style=3D"color:#000"><br><=
/span></div></code></div>You will probably need something like this to allo=
w proper handle of `&lt;` and `&gt;` by compiler in dependent context.<br><=
/div></blockquote><div><br></div><div>I&#39;m not exactly sure what you mea=
n.=C2=A0=C2=A0So, these are potential ways to tell the compiler what it sho=
uld be seeing?=C2=A0 <font face=3D"courier new, monospace">temp</font> is a=
 binary operator?=C2=A0 What is <font face=3D"courier new, monospace">A</fo=
nt>?=C2=A0 Could you please give more context or explain in more detail wha=
t you are attempting to say?</div></div></blockquote><br>What is `temp`? Th=
is is good question that your proposal should answer because it&#39;s depen=
dent name on template parameter `A`. If we implements your proposition how =
you will access it if it is in dependent context?<br>Right now we have way =
to <span lang=3D"en"><span>distinguish </span></span>between objects, types=
 and templates, now with your proposal we will need new way to support your=
 first class aliases.<br></div></blockquote><div><br></div><div>Ah, sorry.=
=C2=A0 Not sure how I misread that.=C2=A0 If I understand the current parsi=
ng of C++, I think your 1st one is most appropriate.=C2=A0 Also, could you =
expand on what you mean by your 2nd item being possibly problematic in c++2=
0?=C2=A0</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/a366da24-92ff-4011-99a9-4aca60390142%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/a366da24-92ff-4011-99a9-4aca60390142=
%40isocpp.org</a>.<br />

------=_Part_28422_2016807006.1513691275162--

------=_Part_28421_793900392.1513691275161--

.
