How to I specify boost::fusion::vector<something> as the type of an argument?

Hi, template <typename T, typename R> class A; I would like a template function, whose argument should be of the type like. boost::fusion::vector<A<T, R1>, A<T, R2>,...> Basically, it is a vector of A. The first template arguments of A's should be the same, but the second ones are not necessarily the same. Would you please let me know how to do this? Thanks, Peng

Peng Yu <pengyu.ut <at> gmail.com> writes:
Hi,
template <typename T, typename R> class A;
I would like a template function, whose argument should be of the type like.
boost::fusion::vector<A<T, R1>, A<T, R2>,...>
I would use something like this: template <class T> enable_if<is_vector_of_A_T_R<T> >::type foo(const T& arg) { ... } Where is_vector_of_A_T_R<T> is a metafunction, that returns true iif T is a fusion::vector of desired structure. Roman Perepelitsa.
participants (2)
-
Peng Yu
-
Roman Perepelitsa