220 35962 <8e4dd67b-e929-4f83-8f68-4a7ebd20a4e3@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: adrian.hawryluk@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Make aliased templates first class citizens
Date: Sun, 17 Dec 2017 16:21:12 -0800 (PST)
Lines: 339
Approved: news@gmane.org
Message-ID: <8e4dd67b-e929-4f83-8f68-4a7ebd20a4e3@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_15117_1155179396.1513556472507"
X-Trace: blaine.gmane.org 1513556359 13798 195.159.176.226 (18 Dec 2017 00:19:19 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 18 Dec 2017 00:19:19 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCULLOGNUQIRB6UT3TIQKGQEBTCVP3A@isocpp.org Mon Dec 18 01:19:15 2017
Return-path: <std-proposals+bncBCULLOGNUQIRB6UT3TIQKGQEBTCVP3A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ua0-f199.google.com ([209.85.217.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCULLOGNUQIRB6UT3TIQKGQEBTCVP3A@isocpp.org>)
	id 1eQj9G-0003Av-5S
	for gclcip-std-proposals@m.gmane.org; Mon, 18 Dec 2017 01:19:14 +0100
Original-Received: by mail-ua0-f199.google.com with SMTP id 107sf9053843uau.20
        for <gclcip-std-proposals@m.gmane.org>; Sun, 17 Dec 2017 16:21:16 -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:subject:mime-version:x-original-sender
         :reply-to:precedence:mailing-list:list-id:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=T0GZaEbkwX56hyvM0FUj98rBdoVKtV34ts2oRUYGIHY=;
        b=zTs92sfQVy9YUQMvw02dewPlRBboD/ROrM+SGj7ycod9u/PI8YWLcIhTaPrkDC1IHW
         e+Rgpp3UEmH43QSfVRo7zvX7v17dsN4X6LcINbsIEoS9NTR91khEkI0vgTToRnxTnSuF
         XCls/Gx031iuTzyNhm3glPFarQm/o1xTu1FRPUhGZyWRzP7Rz2ZjtVuFZ+Kake0cJAHJ
         BxRKySWu0mM1ga1/lmPbYtsSNR0LCQusOIrRzldtg2xy3V/26MJjAk7DnMGb0ey4c3Qs
         5nwCXkNVrChTz214EKMR60BbbovrhRxn1cqr71tbuWR/8SaBxLGyo51Akm5rzL2UeJ2O
         BnPA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:message-id:subject:mime-version:x-original-sender
         :reply-to:precedence:mailing-list:list-id:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=T0GZaEbkwX56hyvM0FUj98rBdoVKtV34ts2oRUYGIHY=;
        b=UdGa2v2aEagmyaJ9kOK8flBvto0abCB1EtNLHf3NFIRQvbtyum5zguxIiY8NTz9PT7
         CqG90EM4I2/91gpVPKRyZXuF760SMrHK9U0N6jOnJYAGvN4Uh5UDbl8I5wDDodEPgf1l
         6aionFU/o0ansVtLp03ptSzQzIQ1fAs8GqLjKdFKQ8hCD6TX2/XwWF0JUsJAwWP1kFuX
         mvrPe7+iryrTGDL/tNH3WQCo+Xtj8FkAo4kfml9PyXZ3TNH4p7Hd/du6gdO2+eui6djB
         kLcZMBkmOaXg7KJhc6aIfK4XuIn7VmXIq6aV2vaJGnVvQDBOU//4YqDxN5Ol/wXW6K2J
         mo9A==
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:message-id: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=T0GZaEbkwX56hyvM0FUj98rBdoVKtV34ts2oRUYGIHY=;
        b=QXqZR2kkUYqoAbw6pACf3sKbTwEH0g8ME23iWSbZZQl5SjwkY0vV4I+OG4SAunNxAs
         lBHB19LN7P70ILh3NtjJd5AC/1kYNdw4SoHSHr0fjIxzL8a9cEt2eXmEbVRjDpkgOvVY
         LaRpK1UsaMrLBqgzBsahaD0kehbaoezLAcBHvY8eYC6isvGQGAPxZhr9q8QgTHCOLrIn
         WecM+M0RnV4d+9Ko+3j8DUlanex48Wxb9/zspHGvSyTbq+iA0DaexqjbL+lQVBmyDpYc
         b5jnmj63lWaUHBRVGjzVio+x7OgEnFX8BwUqwzYzrLCP6+VrPHa6xWERY1ajRLIoxGK0
         OUwQ==
X-Gm-Message-State: AKGB3mLB9kqHHdsrBHfB8u82X7YRGLeIf5vQn4j4VsRXWqQR6bN7a5E/
	mWl/97jdGLkyxVxy1yz1Frc1Zw==
X-Google-Smtp-Source: ACJfBoudSTTCqY3re2SGknSq31DFRHdJILAV86efN9YBe7v6mlbZjyZkWjOVYYOvGecBIqG/Ypinow==
X-Received: by 10.159.55.107 with SMTP id a40mr2972501uae.53.1513556475982;
        Sun, 17 Dec 2017 16:21:15 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.31.242.79 with SMTP id q76ls3882526vkh.12.gmail; Sun, 17 Dec
 2017 16:21:14 -0800 (PST)
X-Received: by 10.31.165.202 with SMTP id o193mr482617vke.9.1513556473079;
        Sun, 17 Dec 2017 16:21:13 -0800 (PST)
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:35962
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/35962>

------=_Part_15117_1155179396.1513556472507
Content-Type: multipart/alternative; 
	boundary="----=_Part_15118_1731546777.1513556472508"

------=_Part_15118_1731546777.1513556472508
Content-Type: text/plain; charset="UTF-8"

Templates are wonderful idea, but if I need to make a template with 
partially defined parameters, this becomes problematic, requireing that an 
intermediate class is made with a template in it.  Because the template 
then becomes a dependent type, we then have to declare the word template 
before it's name if you pass it, which is ugly and sometimes difficult to 
track down what is wrong when you get the syntax incorrect.

Complete template aliasing is available in the language like this:

 template <typename FROM, typename TO>
 using my_is_convertable = std::is_convertable<FROM, TO>;

I propose that partial template aliasing also be allowed, which would allow 
the template be broken up in to 2 or more sub-templates.

For example, say I have a find meta-algorithm, which will have a value that 
is true if any of OP<Ts>::value... are true or false otherwise.  I will 
only declare it here for brevity.

 template <typename <typename> class OP, typename...Ts>
 struct find;

It is defined as a unary template operator to apply the DRY principal.  Now 
if I want to use this on a binary template operator, then I would need to 
bind the parameter.  If known ahead of time, it would become:

 template <typename TO>
 using my_is_convertable = std::is_convertable<int, TO>;

and would be used like so:

 find<my_is_convertable, float, int, double>::value

However, if it's not known ahead of time what to bind the parameter to I 
would have to use an class template with a embded template alias in it like 
this:

 template <typename FROM>
 struct my_is_convertable
 {
   template <typename TO>
   using ttype = std::is_convertable<FROM, TO>;
 };

And use it like this:

 find<my_is_convertable<int>::template ttype, float, int double>::value

I propose that instead we use this syntax to define partial template 
aliasing:

 template <typename TO>
 template <typename FROM>
 using is_convertable = std::is_convertable<TO, FROM>;

 find<my_is_convertable<int>, float, int double>::value

This would also make this valid:

 my_is_convertable<int><int>::value

Which should be fine.

Pros:

Verbosity is lowered, no more need for referring to an embedded template is 
required which follows that the need for the template keyword is also 
removed, all of which reducing noise.  Also it would not break anything in 
the wild.  This would also mostly remove the need for tbind, except in 
cases where symbol leakage is not wanted in the enclosing scope.  

Cons:

Developers would need to get used to the syntax.  Nothing too crazy 
though.  

What is everyone's opinion on this?

-- 
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/8e4dd67b-e929-4f83-8f68-4a7ebd20a4e3%40isocpp.org.

------=_Part_15118_1731546777.1513556472508
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Templates are wonderful idea, but if I need to make a=
 template with partially defined parameters, this becomes problematic, requ=
ireing that an intermediate class is made with a template in it.=C2=A0 Beca=
use the template then becomes a dependent type, we then have to declare the=
 word template before it&#39;s name if you pass it, which is ugly and somet=
imes difficult to track down what is wrong when you get the syntax incorrec=
t.</div><div><br></div><div>Complete template aliasing is available in the =
language like this:</div><div><br></div><div class=3D"prettyprint" style=3D=
"background-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187); bo=
rder-style: solid; border-width: 1px; word-wrap: break-word;"><code class=
=3D"prettyprint"><div class=3D"subprettyprint"><span style=3D"color: #000;"=
 class=3D"styled-by-prettify">=C2=A0</span><span style=3D"color: #008;" cla=
ss=3D"styled-by-prettify">template</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">&lt;</span><span style=3D"color: #008;" class=3D"styled-by-p=
rettify">typename</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"> FROM</span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
><span style=3D"color: #008;" class=3D"styled-by-prettify">typename</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> TO</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">&gt;</span><span style=3D=
"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0</span><span style=3D=
"color: #008;" class=3D"styled-by-prettify">using</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"> my_is_convertable </span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> std</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">::</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify">is_convertable</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify">FROM</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> TO</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">&gt;;</span></div></code></div><div><br></div><div>I propose that partia=
l template aliasing also be allowed, which would allow the template be brok=
en up in to 2 or more sub-templates.</div><div><br></div><div>For example, =
say I have a find meta-algorithm, which will have a <font face=3D"courier n=
ew, monospace">value</font> that is true if any of <font face=3D"courier ne=
w, monospace">OP&lt;Ts&gt;::value...</font> are true or false otherwise.=C2=
=A0 I will only declare it here for brevity.</div><div><br></div><div class=
=3D"prettyprint" style=3D"background-color: rgb(250, 250, 250); border-colo=
r: rgb(187, 187, 187); border-style: solid; border-width: 1px; word-wrap: b=
reak-word;"><code class=3D"prettyprint"><div class=3D"subprettyprint"><span=
 style=3D"color: #000;" class=3D"styled-by-prettify">=C2=A0</span><span sty=
le=3D"color: #008;" class=3D"styled-by-prettify">template</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </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;"=
 class=3D"styled-by-prettify"> </span><span style=3D"color: #080;" class=3D=
"styled-by-prettify">&lt;typename&gt;</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"st=
yled-by-prettify">class</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> OP</span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </=
span><span style=3D"color: #008;" class=3D"styled-by-prettify">typename</sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">...</span><spa=
n style=3D"color: #606;" class=3D"styled-by-prettify">Ts</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&gt;</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"><br>=C2=A0</span><span style=3D"co=
lor: #008;" class=3D"styled-by-prettify">struct</span><span style=3D"color:=
 #000;" class=3D"styled-by-prettify"> find</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">;</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"><br></span></div></code></div><div><br></div><div>I=
t is defined as a unary template operator to apply the DRY principal.=C2=A0=
 Now if I want to use this on a binary template operator, then I would need=
 to bind the parameter.=C2=A0 If known ahead of time, it would become:</div=
><div><br></div><div class=3D"prettyprint" style=3D"background-color: rgb(2=
50, 250, 250); border-color: rgb(187, 187, 187); border-style: solid; borde=
r-width: 1px; word-wrap: break-word;"><code class=3D"prettyprint"><div clas=
s=3D"subprettyprint"><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy">=C2=A0</span><span style=3D"color: #008;" class=3D"styled-by-prettify">=
template</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> <=
/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><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"> TO</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>=C2=A0</span><span style=3D"=
color: #008;" class=3D"styled-by-prettify">using</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> my_is_convertable </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> std</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">::</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify">is_convertable</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: #660;" class=3D"sty=
led-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> TO</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>&gt;;</span></div></code></div><div><br></div><div>and would be used like =
so:</div><div><br></div><div class=3D"prettyprint" style=3D"background-colo=
r: rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-style: soli=
d; border-width: 1px; word-wrap: break-word;"><code class=3D"prettyprint"><=
div class=3D"subprettyprint"><span style=3D"color: #000;" class=3D"styled-b=
y-prettify">=C2=A0find</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">&lt;</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify">my_is_convertable</span><span style=3D"color: #660;" class=3D"styled-=
by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">float=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">int</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">double</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">&gt;::</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify">value<br></span></div></code></div><div><br></div><div>Howe=
ver, if it&#39;s not known ahead of time what to bind the parameter to I wo=
uld have to use an class template with a embded template alias in it like t=
his:</div><div><br></div><div class=3D"prettyprint" style=3D"background-col=
or: rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-style: sol=
id; border-width: 1px; word-wrap: break-word;"><code class=3D"prettyprint">=
<div class=3D"subprettyprint"><span style=3D"color: #000;" class=3D"styled-=
by-prettify">=C2=A0</span><span style=3D"color: #008;" class=3D"styled-by-p=
rettify">template</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">&l=
t;</span><span style=3D"color: #008;" class=3D"styled-by-prettify">typename=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> FROM</spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">&gt;</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0</span><spa=
n style=3D"color: #008;" class=3D"styled-by-prettify">struct</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> my_is_convertable<br>=C2=
=A0</span><span style=3D"color: #660;" class=3D"styled-by-prettify">{</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=
=A0</span><span style=3D"color: #008;" class=3D"styled-by-prettify">templat=
e</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span s=
tyle=3D"color: #008;" class=3D"styled-by-prettify">typename</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify"> TO</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">&gt;</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0</span><span style=3D"=
color: #008;" class=3D"styled-by-prettify">using</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> ttype </span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">=3D</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> std</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">::</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify">is_convertable</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">&lt;</span><span style=3D"color: #000;" class=3D"styled=
-by-prettify">FROM</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
TO</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&gt;;</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">};</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"><br></span></div></co=
de></div><div><br>And use it like this:</div><div><br></div> <div class=3D"=
prettyprint" style=3D"background-color: rgb(250, 250, 250); border-color: r=
gb(187, 187, 187); border-style: solid; border-width: 1px; word-wrap: break=
-word;"><code class=3D"prettyprint"><div class=3D"subprettyprint"><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify">=C2=A0find</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify">my_is_convertable</span><span st=
yle=3D"color: #080;" class=3D"styled-by-prettify">&lt;int&gt;</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">::</span><span style=3D"=
color: #008;" class=3D"styled-by-prettify">template</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> ttype</span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"s=
tyled-by-prettify">float</span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">int<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><sp=
an style=3D"color: #008;" class=3D"styled-by-prettify">double</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">&gt;::</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify">value<br></span></div></code=
></div><div><br>I propose that instead we use this syntax to define partial=
 template aliasing:</div><div><br></div><div class=3D"prettyprint" style=3D=
"background-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187); bo=
rder-style: solid; border-width: 1px; word-wrap: break-word;"><code class=
=3D"prettyprint"><div class=3D"subprettyprint"><span style=3D"color: #000;"=
 class=3D"styled-by-prettify">=C2=A0</span><span style=3D"color: #008;" cla=
ss=3D"styled-by-prettify">template</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">&lt;</span><span style=3D"color: #008;" class=3D"styled-by-p=
rettify">typename</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"> TO</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
&gt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=
=C2=A0</span><span style=3D"color: #008;" class=3D"styled-by-prettify">temp=
late</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><spa=
n style=3D"color: #008;" class=3D"styled-by-prettify">typename</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> FROM</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&gt;</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"><br>=C2=A0</span><span style=3D"co=
lor: #008;" class=3D"styled-by-prettify">using</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify"> is_convertable </span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> std</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">::</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify">is_convertable</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">&lt;</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify">TO</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
"> FROM</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>=
=C2=A0find</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
&lt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify">my_is_=
convertable</span><span style=3D"color: #080;" class=3D"styled-by-prettify"=
>&lt;int&gt;</span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
><span style=3D"color: #008;" class=3D"styled-by-prettify">float</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #008;" class=3D"styled-by-prettify">int</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">double</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">&gt;::</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify">value</span></div></code></div><div><br></div><div>This wou=
ld also make this valid:</div><div><br></div><div class=3D"prettyprint" sty=
le=3D"background-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187=
); border-style: solid; border-width: 1px; word-wrap: break-word;"><code cl=
ass=3D"prettyprint"><div class=3D"subprettyprint"><span style=3D"color: #00=
0;" class=3D"styled-by-prettify">=C2=A0my_is_convertable</span><span style=
=3D"color: #080;" class=3D"styled-by-prettify">&lt;int&gt;&lt;int&gt;</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">::</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify">value<br></span></div></=
code></div><div><br></div><div>Which should be fine.</div><div><br></div><d=
iv>Pros:</div><div><br></div><div>Verbosity is lowered, no more need for re=
ferring to an embedded template is required which follows that the need for=
 the template keyword is also removed, all of which reducing noise.=C2=A0 A=
lso it would not break anything in the wild.=C2=A0 This would also mostly r=
emove the need for <font face=3D"courier new, monospace">tbind</font>, exce=
pt in cases where symbol leakage is not wanted in the enclosing scope.=C2=
=A0=C2=A0</div><div><br></div><div>Cons:</div><div><br></div><div>Developer=
s would need to get used to the syntax.=C2=A0 Nothing too crazy though.=C2=
=A0=C2=A0</div><div><br></div><div>What is everyone&#39;s opinion on this?<=
/div><div><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/8e4dd67b-e929-4f83-8f68-4a7ebd20a4e3%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/8e4dd67b-e929-4f83-8f68-4a7ebd20a4e3=
%40isocpp.org</a>.<br />

------=_Part_15118_1731546777.1513556472508--

------=_Part_15117_1155179396.1513556472507--

.
