E
er
Hi all,
template<class P,template<class> class TC> class A{
typedef TC<P> tc_type;
/*...*/
};
template<class P1,class P2 > class B{/*...*/};
If I want to use B as a parameter in A, for each P2=p2, I need
template<class P1>
class B_p2: public B<P1,p2>{
typedef B<P1,p2> parent_type;
/* may have to write constructors such as B_p2(...)
arent_type(...)
{} */
};
I can use it as:
A<P,B_p2> a_p_t2;
Is there a better way/more generic way than writing a new template
class for each P2?
template<class P,template<class> class TC> class A{
typedef TC<P> tc_type;
/*...*/
};
template<class P1,class P2 > class B{/*...*/};
If I want to use B as a parameter in A, for each P2=p2, I need
template<class P1>
class B_p2: public B<P1,p2>{
typedef B<P1,p2> parent_type;
/* may have to write constructors such as B_p2(...)
{} */
};
I can use it as:
A<P,B_p2> a_p_t2;
Is there a better way/more generic way than writing a new template
class for each P2?