Topic: Types introduced by constrained type specifier


Author: Tomasz <tomaszkam@gmail.com>
Date: Thu, 2 Oct 2014 12:56:59 -0700 (PDT)
Raw View
------=_Part_7216_887785850.1412279819894
Content-Type: text/plain; charset=UTF-8

In the section $8.4.1/17 of newest draft of Concept TS the following
example is presented:
void f4(E a, E<> b, E<0> c);
The types of a , b , and c are distinct invented template type parameters
even though the constraints
associated by the each of the constrained-type-specifiers (7.1.6.5) are
equivalent.
In the example bellow we are referring to the same entity E<0> using
different syntax and this is causing the separate type being introduced.

I would like to see a qualification, what is behavior of following example
that uses concepts with using declarttion. Lets assume that I have
following defintions:
namespace A { template<typename T> concept bool S = true; }
namespace B { using A::S; }
namespace C { using A::S; }

What would following declaration means (in the comment I am presenting my
attempt to resolve declaration):
void foo(A::S, A::S, A::S); //template<typename T> void foo(T, T, T);
void foo(A::S, B::S, C::S); //template<typename T1, typename T2, typename
T3> void foo(T1, T2, T3);
void foo(A::S, A::S, C::S) //template<typename T1, typename T2> void
foo(T1, T1, T3)

And if we use using directive:
using namespace A;
using namespace B;
using namespace C:

void foo(S, A::S, B::S, C::S); //template<typename T1, typename T2,
typename T3, typename T4> void foo(T1, T2, T3, T4)

--

---
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_7216_887785850.1412279819894
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">In the section $8.4.1/17 of newest draft of Concept TS the=
 following example is presented:<br><span style=3D"font-family: courier new=
,monospace;">void f4(E a, E&lt;&gt; b, E&lt;0&gt; c);<br>The types of a , b=
 , and c are distinct invented template type parameters even though the con=
straints<br>associated by the each of the constrained-type-specifiers (7.1.=
6.5) are equivalent.</span><br>In the example bellow we are referring to th=
e same entity E&lt;0&gt; using different syntax and this is causing the sep=
arate type being introduced.<br><br>I would like to see a qualification, wh=
at is behavior of following example that uses concepts with using declartti=
on. Lets assume that I have following defintions:<br><span style=3D"font-fa=
mily: courier new,monospace;">namespace A { template&lt;typename T&gt; conc=
ept bool S =3D true; }<br>namespace B { using A::S; }<br>namespace C { usin=
g A::S; }<br></span><br>What would following declaration means (in the comm=
ent I am presenting my attempt to resolve declaration):<br><span style=3D"f=
ont-family: courier new,monospace;">void foo(A::S, A::S, A::S); //template&=
lt;typename T&gt; void foo(T, T, T);<br>void foo(A::S, B::S, C::S); //templ=
ate&lt;typename T1, typename T2, typename T3&gt; void foo(T1, T2, T3);<br>v=
oid foo(A::S, A::S, C::S) //template&lt;typename T1, typename T2&gt; void f=
oo(T1, T1, T3)<br></span><br>And if we use using directive:<br><span style=
=3D"font-family: courier new,monospace;">using namespace A;<br>using namesp=
ace B;<br>using namespace C:<br><br>void foo(S, A::S, B::S, C::S); //templa=
te&lt;typename T1, typename T2, typename T3, typename T4&gt; void foo(T1, T=
2, T3, T4)</span><br></div>

<p></p>

-- <br />
<br />
--- <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 />
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_7216_887785850.1412279819894--

.