|
Boost Users : |
Subject: [Boost-users] Using an mpl sepquence as a template parameter
From: paul Fultz (pfultz2_at_[hidden])
Date: 2011-11-14 16:16:00
Hi,
I have class that takes an mpl sequence as its parameter like this:
X<mpl::vector<A, B, C> >
And I would like to be able to have the class be used without explicitly declaring the mpl sequence like this:
X<A, B, C>
I know this could be accomplished using variadic template parameters, but I am using an older compiler. I was wondering if there was a macro in
boost to do this, such as:
template<BOOST_MPL_VARIADIC_PARAM_PACK(T)>
class X
{
typedef mpl::vector<BOOST_MPL_VARIADIC_PARAM_UNPACK(T)> type;
};
If a macro is not available, does anyone know how I could write a macro
like this? Or what is the default type used for mpl sequences when a
type is unspecified?
Thanks,Paul
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net