Using an mpl sepquence as a template parameter

Hi,
I have class that takes an mpl sequence as its parameter like this:
X

[Sorry if this was sent twice, but it appears to me that I didn't actually
hit "Send" the first time...]
On Mon, Nov 14, 2011 at 12:26 PM, paul Fultz
I think there are a number of ways to do this. One might be to take
advantage of boost::mpl::na, though it looks like technically an
implementation detail so its stability could be questionable (defined in

Several times I've done something like this:
namespace detail {
struct none {};
template <typename TSeq>
struct strip_none
{
typedef typename boost::mpl::remove

Thanks for the help. After digging around, it seems I can define the two macros like this: #define MPL_VECTOR_PACK(x) BOOST_MPL_PP_DEFAULT_PARAMS(BOOST_MPL_LIMIT_VECTOR_SIZE, x, boost::mpl::na) #define MPL_VECTOR_UNPACK(x) BOOST_MPL_PP_PARAMS(BOOST_MPL_LIMIT_VECTOR_SIZE, x) Except as you say this uses an implementation detail. It would be nice if they added some macros like these in the future, to get semi support for varidiac parameters in older compilers.
participants (3)
-
Gabriel Redner
-
Jeffrey Lee Hellrung, Jr.
-
paul Fultz