
On Fri, 10 Dec 2004 04:49:41 -0700, Larry Evans <cppljevans@cox-internet.com> wrote:
On 12/10/2004 03:19 AM, Peder Holt wrote: [snip]
Still, the problem in his post applies to typedefs. If A<T>::B is a nested class or struct under A<T>, and not a typedef, deduction should always be possible. Yes. Our posts crossed. I had same idea.
In the case where B is a typedef: typedef typename some_class<T> B; you can deduce some_class<T> instead of A<T>::B
Do you mean in the case of Roni's example, that you can deduce by substitution, i.e.
can_deduce: select<B, int, int *>::type --substitute--> can_deduce: select<(C1<T>::value != C2<T>::value), int, int *>::type
?
Nope. can_deduce<T>::type is either int or int*, so we need to make specializations for int and int*, and can ignore can_deduce<T> altogether. Type deduction of nested typedefs would as far as I can see require that can_deduce<T>::type be a separate type from int and int*.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost