220 35984 <90bc6ae9-54a4-4fe5-b4ee-a32db51ca820@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: Mon, 18 Dec 2017 12:56:36 -0800 (PST)
Lines: 131
Approved: news@gmane.org
Message-ID: <90bc6ae9-54a4-4fe5-b4ee-a32db51ca820@isocpp.org>
References: <8e4dd67b-e929-4f83-8f68-4a7ebd20a4e3@isocpp.org>
 <7eb526d4-c557-443c-a7d5-235dc8e44926@isocpp.org>
 <6d5434aa-a3bd-460f-bdbd-3db00772768a@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_7262_1591443954.1513630597046"
X-Trace: blaine.gmane.org 1513630489 14919 195.159.176.226 (18 Dec 2017 20:54:49 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 18 Dec 2017 20:54:49 +0000 (UTC)
Cc: adrian.hawryluk@gmail.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDDLTAGNTIBBBBWX4DIQKGQENGM666A@isocpp.org Mon Dec 18 21:54:44 2017
Return-path: <std-proposals+bncBDDLTAGNTIBBBBWX4DIQKGQENGM666A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vk0-f72.google.com ([209.85.213.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDDLTAGNTIBBBBWX4DIQKGQENGM666A@isocpp.org>)
	id 1eR2Qn-00033u-Bt
	for gclcip-std-proposals@m.gmane.org; Mon, 18 Dec 2017 21:54:37 +0100
Original-Received: by mail-vk0-f72.google.com with SMTP id w69sf6132254vkh.3
        for <gclcip-std-proposals@m.gmane.org>; Mon, 18 Dec 2017 12:56:39 -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=sH58CoP9Rn0TaKoGFKiynXW/hQk7jhUln4d5+cy8hiI=;
        b=tK1rtWi/pqoQIYLWar9eXISuVYPCDthjBVD2afV1EtsV4t75TFPmME+iWAo61R4/PU
         x7i+Ep40uwwfInliPDVnRj+fHS+nV1DmYifcuLHXUnFEgif1cNBOx8NxXQ1H1YsRa/hw
         8zVmlKTWMm0SPlNVkOEsqNHxFKNyLpJbHUZ8Rug51JZeFeo+Eg/m9zvq0DrFhvVFrmeF
         9w1skZdC9V2QwzU+868xBl4vXpONuOoXerm+CdQiSNgSqc5/LH+PFnujtMsHlEJceZHp
         4VZxd3/UdX25FbJ66+HLZco1is776W7vrO3sBf1W96zif5TOPePOUTXh4PEdPf4mY3L+
         9wJw==
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=sH58CoP9Rn0TaKoGFKiynXW/hQk7jhUln4d5+cy8hiI=;
        b=l/e6/aTpoRrnFHKmzlJ1cffRTN8stDzYQpTWfLvTHKyh1l7B2W+ZCcXVf5+gZNshAI
         sMYLZh/aCw301+2qSiZAvi7Pwgh5ChIGoefHIZGc6pPDQAuE0n3WH9a853/T/4uFWPKM
         /yDgDSXMZ6dbMeML4kA3zNlJB6auDQmVttTguJnNmS9Tt+a8wm/4iGLjgo9/s8QYOduo
         3TbNfAToZymc9254bZ/rpxi0vzveBVFvV2kNSNDg7X1cGvZ4fHU/wM0/GRDT6OVU0Zji
         BbsiiRSYTwEEcNuvmejYc6NSudBqIg6eKd6cJrpSexc9MZFU/396FsYLQXnBxzTD91GZ
         YWpg==
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=sH58CoP9Rn0TaKoGFKiynXW/hQk7jhUln4d5+cy8hiI=;
        b=PRwDFblbIdJN6WSd/b+WO9iAPonl9wyjFMQkx9dsC/r32S0p0VPMkupdGZI7EZyD3l
         93Pr+iSQNGpShmVyjnLFjVj8mq6Xo+Q8kLFPBstlcf4tluTWJi2/5wj/2b9c/rPN2wIC
         agFlzALD7EnBPfUcquy1jIq+7kt0HSzIo3lVtx462oaKu+MOFCLwG8orp3talvcLFn4w
         4TwdXIG1N/cf2/MY+gCPyCcpS99JggLZQgs+DBrs8h6xl99CL8aem58DJDnLNpy/4lbi
         3NYEh5TIVeR1yy3H/6RMnDNdHLPtMNS7FhULiNC8GUUXL5dlBK4IQT7vBA7EE/H8lDyS
         XOKw==
X-Gm-Message-State: AKGB3mKi4M/MkYrvkfhDgFcFMZAktKsEA23uPPAoRLT8VxWPnigq1hJy
	uEYOsaGSgKkNHFKAi9ZCKXvV0Q==
X-Google-Smtp-Source: ACJfBouGHV3BvHuRy9BUk0YmENYuBAcZRu/yC5RRRty6Xo12sGaYuQTR8QXi0tVYMaxpeQt74b2Q2w==
X-Received: by 10.159.35.11 with SMTP id 11mr564534uae.42.1513630599300;
        Mon, 18 Dec 2017 12:56:39 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.176.74.12 with SMTP id q12ls5044546uae.4.gmail; Mon, 18 Dec
 2017 12:56:37 -0800 (PST)
X-Received: by 10.31.164.131 with SMTP id n125mr97610vke.14.1513630597692;
        Mon, 18 Dec 2017 12:56:37 -0800 (PST)
In-Reply-To: <6d5434aa-a3bd-460f-bdbd-3db00772768a@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:35984
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/35984>

------=_Part_7262_1591443954.1513630597046
Content-Type: multipart/alternative; 
	boundary="----=_Part_7263_1002987415.1513630597047"

------=_Part_7263_1002987415.1513630597047
Content-Type: text/plain; charset="UTF-8"



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.

-- 
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/90bc6ae9-54a4-4fe5-b4ee-a32db51ca820%40isocpp.org.

------=_Part_7263_1002987415.1513630597047
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Monday, December 18, 2017 at 6:28:12 AM UTC+1, =
adrian....@gmail.com wrote:<blockquote class=3D"gmail_quote" style=3D"margi=
n: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><di=
v dir=3D"ltr">On Sunday, December 17, 2017 at 8:18:29 PM UTC-5, Marcin Jacz=
ewski 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>Ri=
ght 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-w=
idth:1px"><code><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 s=
tyle=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><spa=
n style=3D"color:#000"> A</span><span style=3D"color:#660">::</span><span s=
tyle=3D"color:#008">template</span><span style=3D"color:#000"> </span><span=
 style=3D"color:#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 style=3D"color:#660">&gt;;</span><span style=3D"color:#000"><br></sp=
an><span style=3D"color:#800">//or</span><span style=3D"color:#000"><br></s=
pan><span style=3D"color:#008">template</span><span style=3D"color:#660">&l=
t;</span><span style=3D"color:#008">typename</span><span style=3D"color:#00=
0"> 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:#0=
00"> C </span><span style=3D"color:#660">=3D</span><span style=3D"color:#00=
0"> </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:#008=
">template</span><span style=3D"color:#000"> temp</span><span style=3D"colo=
r:#660">&lt;</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">//this return template not type, this could be problematic when C++20 =
remove options for different `using`</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 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 style=3D"color:#008">template</span><span style=3D"colo=
r:#000"> </span><span style=3D"color:#008">template</span><span style=3D"co=
lor:#000"> A</span><span style=3D"color:#660">::</span><span style=3D"color=
:#000">temp</span><span style=3D"color:#660">;</span><span style=3D"color:#=
000"><br></span></div></code></div>You will probably need something like th=
is to allow proper handle of `&lt;` and `&gt;` by compiler in dependent con=
text.<br></div></blockquote><div><br></div><div>I&#39;m not exactly sure wh=
at you mean.=C2=A0=C2=A0So, these are potential ways to tell the compiler w=
hat it should 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, monosp=
ace">A</font>?=C2=A0 Could you please give more context or explain in more =
detail what you are attempting to say?</div></div></blockquote><br>What is =
`temp`? This is good question that your proposal should answer because it&#=
39;s dependent name on template parameter `A`. If we implements your propos=
ition how you will access it if it is in dependent context?<br>Right now we=
 have way to <span id=3D"result_box" class=3D"short_text" lang=3D"en"><span=
 class=3D"">distinguish </span></span>between objects, types and templates,=
 now with your proposal we will need new way to support your first class al=
iases.<br></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/90bc6ae9-54a4-4fe5-b4ee-a32db51ca820%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/90bc6ae9-54a4-4fe5-b4ee-a32db51ca820=
%40isocpp.org</a>.<br />

------=_Part_7263_1002987415.1513630597047--

------=_Part_7262_1591443954.1513630597046--

.
