Nondeduced concepts reloaded

61 views
Skip to first unread message

dgutson .

unread,
Apr 16, 2015, 1:34:33 PM4/16/15
to std-proposals

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.

Hyman Rosen

unread,
Apr 16, 2015, 1:43:37 PM4/16/15
to std-pr...@isocpp.org
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?


--

---
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-proposal...@isocpp.org.
To post to this group, send email to std-pr...@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

Reply all
Reply to author
Forward
0 new messages