Topic: Nondeduced concepts reloaded


Author: "dgutson ." <danielgutson@gmail.com>
Date: Thu, 16 Apr 2015 14:34:31 -0300
Raw View
--001a11334f146999610513dae00f
Content-Type: text/plain; charset=UTF-8

I guess this has been brought over and over but let me bring this once
again.
Are the nondeduced context restrictions still unsolvable nowadays?
For example :

template <class X >
struct S { struct Inner {} ; };

template <class T> struct Template {};
template <class X> struct Template < typename S<x> :: Inner> { int i;};

Template < S<int> :: Inner> t;

So according to the rules,X cannot be deduced when passing Inner.
I'm neither looking for a workaround nor an  explanation, I just want to
confirm that there is no need to revise these rules at the light of the
latest standard.
Would concepts help here?
Thanks!

  Daniel.

--

---
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/.

--001a11334f146999610513dae00f
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<p dir=3D"ltr">I guess this has been brought over and over but let me bring=
 this once again.<br>
Are the nondeduced context restrictions still unsolvable nowadays?<br>
For example :</p>
<p dir=3D"ltr">template &lt;class X &gt;<br>
struct S { struct Inner {} ; };</p>
<p dir=3D"ltr">template &lt;class T&gt; struct Template {};<br>
template &lt;class X&gt; struct Template &lt; typename S&lt;x&gt; :: Inner&=
gt; { int i;};</p>
<p dir=3D"ltr">Template &lt; S&lt;int&gt; :: Inner&gt; t;<br></p>
<p dir=3D"ltr">So according to the rules,X cannot be deduced when passing I=
nner.<br>
I&#39;m neither looking for a workaround nor an=C2=A0 explanation, I just w=
ant to confirm that there is no need to revise these rules at the light of =
the latest standard.<br>
Would concepts help here?<br>
Thanks!</p>
<p dir=3D"ltr">=C2=A0 Daniel.</p>

<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 />

--001a11334f146999610513dae00f--

.


Author: Hyman Rosen <hyman.rosen@gmail.com>
Date: Thu, 16 Apr 2015 13:43:16 -0400
Raw View
--001a1135a44ad97ba50513db0009
Content-Type: text/plain; charset=UTF-8

The reason for this is still the same:

template <class X> struct S { struct Inner { }; };
template <class X> struct S<X *> { using Inner = typename S<X>::Inner; };
template <class X> void f(typename S<X>::Inner);
auto a = S<char*>::Inner();

What X should f(a) deduce?


On Thu, Apr 16, 2015 at 1:34 PM, dgutson . <danielgutson@gmail.com> wrote:

> I guess this has been brought over and over but let me bring this once
> again.
> Are the nondeduced context restrictions still unsolvable nowadays?
> For example :
>
> template <class X >
> struct S { struct Inner {} ; };
>
> template <class T> struct Template {};
> template <class X> struct Template < typename S<x> :: Inner> { int i;};
>
> Template < S<int> :: Inner> t;
>
> So according to the rules,X cannot be deduced when passing Inner.
> I'm neither looking for a workaround nor an  explanation, I just want to
> confirm that there is no need to revise these rules at the light of the
> latest standard.
> Would concepts help here?
> Thanks!
>
>   Daniel.
>
> --
>
> ---
> 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/.
>

--

---
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/.

--001a1135a44ad97ba50513db0009
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">The reason for this is still the same:<br><br>template &lt=
;class X&gt; struct S { struct Inner { }; };<br>template &lt;class X&gt; st=
ruct S&lt;X *&gt; { using Inner =3D typename S&lt;X&gt;::Inner; };<br>templ=
ate &lt;class X&gt; void f(typename S&lt;X&gt;::Inner);<div>auto a =3D S&lt=
;char*&gt;::Inner();<br></div><div><br>What X should f(a) deduce?<br><br></=
div></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Thu,=
 Apr 16, 2015 at 1:34 PM, dgutson . <span dir=3D"ltr">&lt;<a href=3D"mailto=
:danielgutson@gmail.com" target=3D"_blank">danielgutson@gmail.com</a>&gt;</=
span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8e=
x;border-left:1px #ccc solid;padding-left:1ex"><p dir=3D"ltr">I guess this =
has been brought over and over but let me bring this once again.<br>
Are the nondeduced context restrictions still unsolvable nowadays?<br>
For example :</p>
<p dir=3D"ltr">template &lt;class X &gt;<br>
struct S { struct Inner {} ; };</p>
<p dir=3D"ltr">template &lt;class T&gt; struct Template {};<br>
template &lt;class X&gt; struct Template &lt; typename S&lt;x&gt; :: Inner&=
gt; { int i;};</p>
<p dir=3D"ltr">Template &lt; S&lt;int&gt; :: Inner&gt; t;<br></p>
<p dir=3D"ltr">So according to the rules,X cannot be deduced when passing I=
nner.<br>
I&#39;m neither looking for a workaround nor an=C2=A0 explanation, I just w=
ant to confirm that there is no need to revise these rules at the light of =
the latest standard.<br>
Would concepts help here?<br>
Thanks!</p>
<p dir=3D"ltr">=C2=A0 Daniel.</p><span class=3D"HOEnZb"><font color=3D"#888=
888">

<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" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</font></span></blockquote></div><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 />

--001a1135a44ad97ba50513db0009--

.