#include #include #include #include #include #include #include #include #include #include typedef boost::mpl::vector_c::type left; typedef boost::mpl::vector_c::type right; struct join_unique { template struct apply { typedef typename boost::mpl::copy_if< Sequence2, boost::mpl::not_< boost::mpl::contains< Sequence1, boost::mpl::placeholders::_1> >, boost::mpl::back_inserter >::type type; }; }; typedef typename join_unique::apply::type joined; struct printer { template void operator()(const T& val) { std::cout << val << std::endl; } }; int main() { boost::mpl::for_each(printer()); }