Topic: Thoughts on N3878: Extensions to the concept
Author: Alex B <devalexb@gmail.com>
Date: Thu, 23 Jan 2014 21:43:09 -0800 (PST)
Raw View
------=_Part_223_15197751.1390542189977
Content-Type: text/plain; charset=UTF-8
In section 2.3, it is written that the concept introduction syntax for
variable declaration should be made to work with auto as well. It should
probably be true in all contexts (not only in variable declarations):
auto{T}
void f(T x, T y);
template <auto{T}>
class A {};
auto{T}
class B {};
Also, it is not quite clear how concept introduction will work in some
contexts (when using qualifiers or decltype):
// Unconstrained (C++14)
Concept a = f();
Concept&& b = f();
decltype(Concept) c = f();
// Constrained
Concept{A} a = f();
Concept{B}&& b = f(); // or is it: Concept&&{B} b = f();
decltype(Concept{C}) c = f(); // or is it: decltype(Concept){C} c = f();
Overall, I have to say that these extensions proposed to the concept
introduction syntax is very consistent and makes a lot of sense. In fact,
it makes me realize that the old shorthand notation is much less consistent
and should probably be dropped. Let me explain.
Declaring using a concept name in most cases mean declaring a
parameter/variable with a 'constrained auto' fashion.
void f(Concept x);
Concept g() { ... }
Concept a = g();
However, there is one case where what is declared is a constrained type
(not a parameter/variable):
template <Concept T> // Shorthand notation
....
Now that there is an extended concept introduction syntax, this shorthand
notation doesn't bring much and it would be better to deprecate it.
The first reason to deprecate it would be for consistency. In most
contexts, a concept name can be a drop-in replacement for the auto keyword.
But in the shorthand notation, it is a drop-in replacement for the class/
typename keyword. Using the shorthand notation, it might not be clear for a
beginner whether the constrained template parameter is a type or non-type.
The second (and probably most important) reason is to take into account
possible future proposals. For example if we are someday to allow the
result of any constant expression as a template parameter or to allow
deduced type (with auto or a concept) for value parameters:
template <Integral{T} I>
using deduced_constant = integral_constant<T, I>;
template <FloatingPoint{T} F>
using deduced_constant = floating_point_constant<T, F>;
I'm not saying that this kind of thing should be covered by the concept
lite TS just yet but that the door shouldn't be closed to these kinds of
features. The shorthand notation pretty much prevents them.
--
---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
------=_Part_223_15197751.1390542189977
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div style=3D"font: small/normal arial; color: rgb(34, 34,=
34); text-transform: none; text-indent: 0px; letter-spacing: normal; word-=
spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: no=
rmal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;=
">In section 2.3, it is written that the concept introduction syntax for va=
riable declaration should be made to work with auto as well. It should prob=
ably be true in all contexts (not only in variable declarations):</div><div=
style=3D"font: small/normal arial; color: rgb(34, 34, 34); text-transform:=
none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-s=
pace: normal; font-size-adjust: none; font-stretch: normal; background-colo=
r: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;"><br></div><div clas=
s=3D"prettyprint" style=3D"border: 1px solid rgb(187, 187, 187); border-ima=
ge: none; -ms-word-wrap: break-word; background-color: rgb(250, 250, 250);"=
><code class=3D"prettyprint"><div class=3D"subprettyprint"><span class=3D"s=
tyled-by-prettify" style=3D"color: rgb(0, 0, 136);">auto</span><span class=
=3D"styled-by-prettify" style=3D"color: rgb(102, 102, 0);">{</span><span cl=
ass=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 0);">T</span><span cla=
ss=3D"styled-by-prettify" style=3D"color: rgb(102, 102, 0);">}</span><span =
class=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 0);"><br></span><spa=
n class=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 136);">void</span>=
<span class=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 0);"> f</span>=
<span class=3D"styled-by-prettify" style=3D"color: rgb(102, 102, 0);">(</sp=
an><span class=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 0);">T x</s=
pan><span class=3D"styled-by-prettify" style=3D"color: rgb(102, 102, 0);">,=
</span><span class=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 0);"> T=
y</span><span class=3D"styled-by-prettify" style=3D"color: rgb(102, 102, 0=
);">);</span><span class=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 0=
);"><br><br></span><span class=3D"styled-by-prettify" style=3D"color: rgb(0=
, 0, 136);">template</span><span class=3D"styled-by-prettify" style=3D"colo=
r: rgb(0, 0, 0);"> </span><span class=3D"styled-by-prettify" style=3D"color=
: rgb(102, 102, 0);"><</span><span class=3D"styled-by-prettify" style=3D=
"color: rgb(0, 0, 136);">auto</span><span class=3D"styled-by-prettify" styl=
e=3D"color: rgb(102, 102, 0);">{</span><span class=3D"styled-by-prettify" s=
tyle=3D"color: rgb(0, 0, 0);">T</span><span class=3D"styled-by-prettify" st=
yle=3D"color: rgb(102, 102, 0);">}></span><span class=3D"styled-by-prett=
ify" style=3D"color: rgb(0, 0, 0);"><br></span><span class=3D"styled-by-pre=
ttify" style=3D"color: rgb(0, 0, 136);">class</span><span class=3D"styled-b=
y-prettify" style=3D"color: rgb(0, 0, 0);"> A </span><span class=3D"styled-=
by-prettify" style=3D"color: rgb(102, 102, 0);">{};</span><span class=3D"st=
yled-by-prettify" style=3D"color: rgb(0, 0, 0);"><br><br></span><span class=
=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 136);">auto</span><span c=
lass=3D"styled-by-prettify" style=3D"color: rgb(102, 102, 0);">{</span><spa=
n class=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 0);">T</span><span=
class=3D"styled-by-prettify" style=3D"color: rgb(102, 102, 0);">}</span><s=
pan class=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 0);"><br></span>=
<span class=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 136);">class</=
span><span class=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 0);"> B <=
/span><span class=3D"styled-by-prettify" style=3D"color: rgb(102, 102, 0);"=
>{};</span></div></code></div><div style=3D"font: small/normal arial; color=
: rgb(34, 34, 34); text-transform: none; text-indent: 0px; letter-spacing: =
normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; fon=
t-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-strok=
e-width: 0px;"><br></div><div style=3D"font: small/normal arial; color: rgb=
(34, 34, 34); text-transform: none; text-indent: 0px; letter-spacing: norma=
l; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-str=
etch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-wid=
th: 0px;"><br></div><div style=3D"font: small/normal arial; color: rgb(34, =
34, 34); text-transform: none; text-indent: 0px; letter-spacing: normal; wo=
rd-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch:=
normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0=
px;">Also, it is not quite clear how concept introduction will work in some=
contexts (when using qualifiers or<span class=3D"Apple-converted-space">&n=
bsp;</span><span class=3D"J-JK9eJ-PJVNOc" style=3D"background-color: yellow=
;">decltype</span>):</div><div style=3D"font: small/normal arial; color: rg=
b(34, 34, 34); text-transform: none; text-indent: 0px; letter-spacing: norm=
al; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-st=
retch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-wi=
dth: 0px;"><br></div><div class=3D"prettyprint" style=3D"border: 1px solid =
rgb(187, 187, 187); border-image: none; -ms-word-wrap: break-word; backgrou=
nd-color: rgb(250, 250, 250);"><code class=3D"prettyprint"><div class=3D"su=
bprettyprint"><span class=3D"styled-by-prettify" style=3D"color: rgb(136, 0=
, 0);">// Unconstrained (C++14)</span><span class=3D"styled-by-prettify" st=
yle=3D"color: rgb(0, 0, 0);"><br></span><span class=3D"styled-by-prettify" =
style=3D"color: rgb(102, 0, 102);">Concept</span><span class=3D"styled-by-p=
rettify" style=3D"color: rgb(0, 0, 0);"> a </span><span class=3D"styled-by-=
prettify" style=3D"color: rgb(102, 102, 0);">=3D</span><span class=3D"style=
d-by-prettify" style=3D"color: rgb(0, 0, 0);"> f</span><span class=3D"style=
d-by-prettify" style=3D"color: rgb(102, 102, 0);">();</span><span class=3D"=
styled-by-prettify" style=3D"color: rgb(0, 0, 0);"><br></span><span class=
=3D"styled-by-prettify" style=3D"color: rgb(102, 0, 102);">Concept</span><s=
pan class=3D"styled-by-prettify" style=3D"color: rgb(102, 102, 0);">&&a=
mp;</span><span class=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 0);"=
> b </span><span class=3D"styled-by-prettify" style=3D"color: rgb(102, 102,=
0);">=3D</span><span class=3D"styled-by-prettify" style=3D"color: rgb(0, 0=
, 0);"> f</span><span class=3D"styled-by-prettify" style=3D"color: rgb(102,=
102, 0);">();</span><span class=3D"styled-by-prettify" style=3D"color: rgb=
(0, 0, 0);"><br></span><span class=3D"styled-by-prettify" style=3D"color: r=
gb(0, 0, 136);">decltype</span><span class=3D"styled-by-prettify" style=3D"=
color: rgb(102, 102, 0);">(</span><span class=3D"styled-by-prettify" style=
=3D"color: rgb(102, 0, 102);">Concept</span><span class=3D"styled-by-pretti=
fy" style=3D"color: rgb(102, 102, 0);">)</span><span class=3D"styled-by-pre=
ttify" style=3D"color: rgb(0, 0, 0);"> c </span><span class=3D"styled-by-pr=
ettify" style=3D"color: rgb(102, 102, 0);">=3D</span><span class=3D"styled-=
by-prettify" style=3D"color: rgb(0, 0, 0);"> f</span><span class=3D"styled-=
by-prettify" style=3D"color: rgb(102, 102, 0);">();</span><span class=3D"st=
yled-by-prettify" style=3D"color: rgb(0, 0, 0);"><br></span><span class=3D"=
styled-by-prettify" style=3D"color: rgb(0, 0, 0);"><br></span><span class=
=3D"styled-by-prettify" style=3D"color: rgb(136, 0, 0);">// Constrained</sp=
an><span class=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 0);"><br></=
span><span class=3D"styled-by-prettify" style=3D"color: rgb(102, 0, 102);">=
Concept</span><span class=3D"styled-by-prettify" style=3D"color: rgb(102, 1=
02, 0);">{</span><span class=3D"styled-by-prettify" style=3D"color: rgb(0, =
0, 0);">A</span><span class=3D"styled-by-prettify" style=3D"color: rgb(102,=
102, 0);">}</span><span class=3D"styled-by-prettify" style=3D"color: rgb(0=
, 0, 0);"> a </span><span class=3D"styled-by-prettify" style=3D"color: rgb(=
102, 102, 0);">=3D</span><span class=3D"styled-by-prettify" style=3D"color:=
rgb(0, 0, 0);"> f</span><span class=3D"styled-by-prettify" style=3D"color:=
rgb(102, 102, 0);">();</span><span class=3D"styled-by-prettify" style=3D"c=
olor: rgb(0, 0, 0);"><br></span><span class=3D"styled-by-prettify" style=3D=
"color: rgb(102, 0, 102);">Concept</span><span class=3D"styled-by-prettify"=
style=3D"color: rgb(102, 102, 0);">{</span><span class=3D"styled-by-pretti=
fy" style=3D"color: rgb(0, 0, 0);">B</span><span class=3D"styled-by-prettif=
y" style=3D"color: rgb(102, 102, 0);">}&&</span><span class=3D"styl=
ed-by-prettify" style=3D"color: rgb(0, 0, 0);"> b </span><span class=3D"sty=
led-by-prettify" style=3D"color: rgb(102, 102, 0);">=3D</span><span class=
=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 0);"> f</span><span class=
=3D"styled-by-prettify" style=3D"color: rgb(102, 102, 0);">();</span><span =
class=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 0);"> =
</span><span class=3D"styled-by-prettify" style=3D"color: rgb=
(136, 0, 0);">// or is it: Concept&&{B} b =3D f();</span><sp=
an class=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 0);"><br></span><=
span class=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 136);">decltype=
</span><span class=3D"styled-by-prettify" style=3D"color: rgb(102, 102, 0);=
">(</span><span class=3D"styled-by-prettify" style=3D"color: rgb(102, 0, 10=
2);">Concept</span><span class=3D"styled-by-prettify" style=3D"color: rgb(1=
02, 102, 0);">{</span><span class=3D"styled-by-prettify" style=3D"color: rg=
b(0, 0, 0);">C</span><span class=3D"styled-by-prettify" style=3D"color: rgb=
(102, 102, 0);">})</span><span class=3D"styled-by-prettify" style=3D"color:=
rgb(0, 0, 0);"> c </span><span class=3D"styled-by-prettify" style=3D"color=
: rgb(102, 102, 0);">=3D</span><span class=3D"styled-by-prettify" style=3D"=
color: rgb(0, 0, 0);"> f</span><span class=3D"styled-by-prettify" style=3D"=
color: rgb(102, 102, 0);">();</span><span class=3D"styled-by-prettify" styl=
e=3D"color: rgb(0, 0, 0);"> </span><span class=3D"styled-by-prettify" style=
=3D"color: rgb(136, 0, 0);">// or is it: decltype(Concept){C} c =3D =
f();</span></div></code></div><div style=3D"font: small/normal arial; color=
: rgb(34, 34, 34); text-transform: none; text-indent: 0px; letter-spacing: =
normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; fon=
t-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-strok=
e-width: 0px;"><br></div><div style=3D"font: small/normal arial; color: rgb=
(34, 34, 34); text-transform: none; text-indent: 0px; letter-spacing: norma=
l; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-str=
etch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-wid=
th: 0px;"><br></div><div style=3D"font: small/normal arial; color: rgb(34, =
34, 34); text-transform: none; text-indent: 0px; letter-spacing: normal; wo=
rd-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch:=
normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0=
px;">Overall, I have to say that these extensions proposed to the concept i=
ntroduction syntax is very consistent and makes a lot of sense. In fact, it=
makes me realize that the old shorthand notation is much less consistent a=
nd should probably be dropped. Let me explain.</div><div style=3D"font: sma=
ll/normal arial; color: rgb(34, 34, 34); text-transform: none; text-indent:=
0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-=
size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 25=
5); -webkit-text-stroke-width: 0px;"><br></div><div style=3D"font: small/no=
rmal arial; color: rgb(34, 34, 34); text-transform: none; text-indent: 0px;=
letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-=
adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -=
webkit-text-stroke-width: 0px;">Declaring using a concept name in most case=
s mean declaring a parameter/variable with a 'constrained auto' fashion.</d=
iv><div style=3D"font: small/normal arial; color: rgb(34, 34, 34); text-tra=
nsform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; =
white-space: normal; font-size-adjust: none; font-stretch: normal; backgrou=
nd-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;"><br></div><d=
iv class=3D"prettyprint" style=3D"border: 1px solid rgb(187, 187, 187); bor=
der-image: none; -ms-word-wrap: break-word; background-color: rgb(250, 250,=
250);"><code class=3D"prettyprint"><div class=3D"subprettyprint"><span cla=
ss=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 136);">void</span><span=
class=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 0);"> f</span><span=
class=3D"styled-by-prettify" style=3D"color: rgb(102, 102, 0);">(</span><s=
pan class=3D"styled-by-prettify" style=3D"color: rgb(102, 0, 102);">Concept=
</span><span class=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 0);"> x=
</span><span class=3D"styled-by-prettify" style=3D"color: rgb(102, 102, 0);=
">);</span><span class=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 0);=
"><br></span><span class=3D"styled-by-prettify" style=3D"color: rgb(102, 0,=
102);">Concept</span><span class=3D"styled-by-prettify" style=3D"color: rg=
b(0, 0, 0);"> g</span><span class=3D"styled-by-prettify" style=3D"color: rg=
b(102, 102, 0);">()</span><span class=3D"styled-by-prettify" style=3D"color=
: rgb(0, 0, 0);"> </span><span class=3D"styled-by-prettify" style=3D"color:=
rgb(102, 102, 0);">{</span><span class=3D"styled-by-prettify" style=3D"col=
or: rgb(0, 0, 0);"> </span><span class=3D"styled-by-prettify" style=3D"colo=
r: rgb(102, 102, 0);">...</span><span class=3D"styled-by-prettify" style=3D=
"color: rgb(0, 0, 0);"> </span><span class=3D"styled-by-prettify" style=3D"=
color: rgb(102, 102, 0);">}</span><span class=3D"styled-by-prettify" style=
=3D"color: rgb(0, 0, 0);"><br></span><span class=3D"styled-by-prettify" sty=
le=3D"color: rgb(102, 0, 102);">Concept</span><span class=3D"styled-by-pret=
tify" style=3D"color: rgb(0, 0, 0);"> a </span><span class=3D"styled-by-pre=
ttify" style=3D"color: rgb(102, 102, 0);">=3D</span><span class=3D"styled-b=
y-prettify" style=3D"color: rgb(0, 0, 0);"> g</span><span class=3D"styled-b=
y-prettify" style=3D"color: rgb(102, 102, 0);">();</span></div></code></div=
><div style=3D"font: small/normal arial; color: rgb(34, 34, 34); text-trans=
form: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; wh=
ite-space: normal; font-size-adjust: none; font-stretch: normal; background=
-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;"><br></div><div=
style=3D"font: small/normal arial; color: rgb(34, 34, 34); text-transform:=
none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-s=
pace: normal; font-size-adjust: none; font-stretch: normal; background-colo=
r: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;">However, there is o=
ne case where what is declared is a constrained type (not a parameter/varia=
ble):</div><div style=3D"font: small/normal arial; color: rgb(34, 34, 34); =
text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacin=
g: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; =
background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;"><br>=
</div><div class=3D"prettyprint" style=3D"border: 1px solid rgb(187, 187, 1=
87); border-image: none; -ms-word-wrap: break-word; background-color: rgb(2=
50, 250, 250);"><code class=3D"prettyprint"><div class=3D"subprettyprint"><=
span class=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 136);">template=
</span><span class=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 0);"> <=
/span><span class=3D"styled-by-prettify" style=3D"color: rgb(102, 102, 0);"=
><</span><span class=3D"styled-by-prettify" style=3D"color: rgb(102, 0, =
102);">Concept</span><span class=3D"styled-by-prettify" style=3D"color: rgb=
(0, 0, 0);"> T</span><span class=3D"styled-by-prettify" style=3D"color: rgb=
(102, 102, 0);">></span><span class=3D"styled-by-prettify" style=3D"colo=
r: rgb(0, 0, 0);"> </span><span class=3D"styled-by-prettify" style=3D"color=
: rgb(136, 0, 0);">// Shorthand notation</span><span class=3D"styled-by-pre=
ttify" style=3D"color: rgb(0, 0, 0);"><br></span><span class=3D"styled-by-p=
rettify" style=3D"color: rgb(102, 102, 0);">...</span></div></code></div><d=
iv style=3D"font: small/normal arial; color: rgb(34, 34, 34); text-transfor=
m: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white=
-space: normal; font-size-adjust: none; font-stretch: normal; background-co=
lor: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;"><br></div><div st=
yle=3D"font: small/normal arial; color: rgb(34, 34, 34); text-transform: no=
ne; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-spac=
e: normal; font-size-adjust: none; font-stretch: normal; background-color: =
rgb(255, 255, 255); -webkit-text-stroke-width: 0px;">Now that there is an e=
xtended concept introduction syntax, this shorthand notation doesn't bring =
much and it would be better to deprecate it.</div><div style=3D"font: small=
/normal arial; color: rgb(34, 34, 34); text-transform: none; text-indent: 0=
px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-si=
ze-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255)=
; -webkit-text-stroke-width: 0px;"><br></div><div style=3D"font: small/norm=
al arial; color: rgb(34, 34, 34); text-transform: none; text-indent: 0px; l=
etter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-ad=
just: none; font-stretch: normal; background-color: rgb(255, 255, 255); -we=
bkit-text-stroke-width: 0px;">The first reason to deprecate it would be for=
consistency. In most contexts, a concept name can be a drop-in replacement=
for the auto keyword. But in the shorthand notation, it is a drop-in repla=
cement for the class/<span class=3D"J-JK9eJ-PJVNOc" style=3D"background-col=
or: yellow;">typename</span><span class=3D"Apple-converted-space"> </s=
pan>keyword. Using the shorthand notation, it might not be clear for a begi=
nner whether the constrained template parameter is a type or non-type.</div=
><div style=3D"font: small/normal arial; color: rgb(34, 34, 34); text-trans=
form: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; wh=
ite-space: normal; font-size-adjust: none; font-stretch: normal; background=
-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;"><br></div><div=
style=3D"font: small/normal arial; color: rgb(34, 34, 34); text-transform:=
none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-s=
pace: normal; font-size-adjust: none; font-stretch: normal; background-colo=
r: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;">The second (and pro=
bably most important) reason is to take into account possible future propos=
als. For example if we are someday to allow the result of any constant expr=
ession as a template parameter or to allow deduced type (with auto or a con=
cept) for value parameters:</div><div style=3D"font: small/normal aria=
l; color: rgb(34, 34, 34); text-transform: none; text-indent: 0px; letter-s=
pacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: n=
one; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-te=
xt-stroke-width: 0px;"><br></div><div class=3D"prettyprint" style=3D"border=
: 1px solid rgb(187, 187, 187); border-image: none; -ms-word-wrap: break-wo=
rd; background-color: rgb(250, 250, 250);"><code class=3D"prettyprint"><div=
class=3D"subprettyprint"><span class=3D"styled-by-prettify" style=3D"color=
: rgb(0, 0, 136);">template</span><span class=3D"styled-by-prettify" style=
=3D"color: rgb(0, 0, 0);"> </span><span class=3D"styled-by-prettify" style=
=3D"color: rgb(102, 102, 0);"><</span><span class=3D"styled-by-prettify"=
style=3D"color: rgb(102, 0, 102);">Integral</span><span class=3D"styled-by=
-prettify" style=3D"color: rgb(102, 102, 0);">{</span><span class=3D"styled=
-by-prettify" style=3D"color: rgb(0, 0, 0);">T</span><span class=3D"styled-=
by-prettify" style=3D"color: rgb(102, 102, 0);">}</span><span class=3D"styl=
ed-by-prettify" style=3D"color: rgb(0, 0, 0);"> I</span><span class=3D"styl=
ed-by-prettify" style=3D"color: rgb(102, 102, 0);">></span><span class=
=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 0);"><br></span><span cla=
ss=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 136);">using</span><spa=
n class=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 0);"> deduced_cons=
tant </span><span class=3D"styled-by-prettify" style=3D"color: rgb(102, 102=
, 0);">=3D</span><span class=3D"styled-by-prettify" style=3D"color: rgb(0, =
0, 0);"> integral_constant</span><span class=3D"styled-by-prettify" style=
=3D"color: rgb(102, 102, 0);"><</span><span class=3D"styled-by-prettify"=
style=3D"color: rgb(0, 0, 0);">T</span><span class=3D"styled-by-prettify" =
style=3D"color: rgb(102, 102, 0);">,</span><span class=3D"styled-by-prettif=
y" style=3D"color: rgb(0, 0, 0);"> I</span><span class=3D"styled-by-prettif=
y" style=3D"color: rgb(102, 102, 0);">>;</span><span class=3D"styled-by-=
prettify" style=3D"color: rgb(0, 0, 0);"><br><br></span><span class=3D"styl=
ed-by-prettify" style=3D"color: rgb(0, 0, 136);">template</span><span class=
=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 0);"> </span><span class=
=3D"styled-by-prettify" style=3D"color: rgb(102, 102, 0);"><</span><span=
class=3D"styled-by-prettify" style=3D"color: rgb(102, 0, 102);">FloatingPo=
int</span><span class=3D"styled-by-prettify" style=3D"color: rgb(102, 102, =
0);">{</span><span class=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 0=
);">T</span><span class=3D"styled-by-prettify" style=3D"color: rgb(102, 102=
, 0);">}</span><span class=3D"styled-by-prettify" style=3D"color: rgb(0, 0,=
0);"> F</span><span class=3D"styled-by-prettify" style=3D"color: rgb(102, =
102, 0);">></span><span class=3D"styled-by-prettify" style=3D"color: rgb=
(0, 0, 0);"><br></span><span class=3D"styled-by-prettify" style=3D"color: r=
gb(0, 0, 136);">using</span><span class=3D"styled-by-prettify" style=3D"col=
or: rgb(0, 0, 0);"> deduced_constant </span><span class=3D"styled-by-pretti=
fy" style=3D"color: rgb(102, 102, 0);">=3D</span><span class=3D"styled-by-p=
rettify" style=3D"color: rgb(0, 0, 0);"> floating_point_constant</span><spa=
n class=3D"styled-by-prettify" style=3D"color: rgb(102, 102, 0);"><</spa=
n><span class=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 0);">T</span=
><span class=3D"styled-by-prettify" style=3D"color: rgb(102, 102, 0);">,</s=
pan><span class=3D"styled-by-prettify" style=3D"color: rgb(0, 0, 0);"> F</s=
pan><span class=3D"styled-by-prettify" style=3D"color: rgb(102, 102, 0);">&=
gt;;</span></div></code></div><div style=3D"font: small/normal arial; color=
: rgb(34, 34, 34); text-transform: none; text-indent: 0px; letter-spacing: =
normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; fon=
t-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-strok=
e-width: 0px;"><div style=3D"font: small/normal arial; color: rgb(34, 34, 3=
4); text-transform: none; text-indent: 0px; letter-spacing: normal; word-sp=
acing: 0px; white-space: normal; font-size-adjust: none; font-stretch: norm=
al; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;">=
<br></div><div style=3D"font: small/normal arial; color: rgb(34, 34, 34); t=
ext-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing=
: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; b=
ackground-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;">I'm n=
ot saying that this kind of thing should be covered by the concept lite TS =
just yet but that the door shouldn't be closed to these kinds of features. =
The shorthand notation pretty much prevents them.</div><div style=3D"font: =
small/normal arial; color: rgb(34, 34, 34); text-transform: none; text-inde=
nt: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; fo=
nt-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255,=
255); -webkit-text-stroke-width: 0px;"><br></div></div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
------=_Part_223_15197751.1390542189977--
.