Parameter packs cannot be easily stored, so I don't think what you want can be done. However, since you seem to need this feature in order to inherit from a set of bases, you can use some template metaprogramming to create a base type inheriting linearly from all the bases in your set. Before that, you can easily filter the duplicates from the parameter pack.
Here is an implementation of this approach using Boost.MPL:
#include <boost/mpl/fold.hpp>
#include <boost/mpl/inherit.hpp>
#include <boost/mpl/inherit_linearly.hpp>
#include <boost/mpl/insert.hpp>
#include <boost/mpl/placeholders.hpp>
#include <boost/mpl/set.hpp>
#include <boost/mpl/vector.hpp>
namespace mpl = boost::mpl;
template < typename ...Args >
struct inherit_uniquely
{
// filter out duplicates
typedef typename
mpl::fold<
mpl::vector< Args... >,
mpl::set0<>,
mpl::insert< mpl::_1, mpl::_2 >
>::type unique_bases;
// create base type
typedef typename
mpl::inherit_linearly<
unique_bases,
mpl::inherit< mpl::_1, mpl::_2 >
>::type type;
};
template < typename ...Bases >
struct Derived : inherit_uniquely< Bases... >::type
{};
struct X { int x;};
struct Y { int y;};
struct Z { int z;};
int main()
{
Derived< X, Y, Z > d;
d.x = 1;
d.y = 2;
d.z = 3;
X& d_as_x = d;
Y& d_as_y = d;
Z& d_as_z = d;
}