The boost::mpl
algorithms seem not to be able to work on std::tuple
types out of the box, e.g., the following does not compile (boost-1.46.0, g++ snapshot 2011-02-19):
#include
#include
#include
namespace mpl=boost::mpl;
typedef mpl::vector types;
static_assert(mpl::contains::value, "vector contains bool");
typedef std::tuple types2;
// the following does not compile:
// error: no class template named ‘apply’ in ‘struct boost::mpl::contains_impl’
static_assert(mpl::contains::value, "tuple contains bool");
What is the easiest way to make the boost::mpl
algorithms work on std::tuple
?
boost::fusion
provide this functionality (as it does so for boost::tuple
)?boost::tuple
to std::tuple
easily?