Suppose I have an boost::mpl::vector "myvec", defined for example like this:
using myvec = boost::mpl::vector<int, double, double>;
Now I want to define another type, myvecex, that transforms each myvec member into std::tuple with added string. I want to get a type defined like this:
using myvecex = boost::mpl::vector<std::tuple<int, std::string>,
std::tuple<double, std::string>,
std::tuple<double, std::string> >;
But I don't want to repeat myself and name all the vector members. Instead I want to define some_smart_template template type where I will somehow put the logic of converting each member type into a tuple.
using myvecex2 = some_smart_template<myvec>;
static_assert(std::is_same<myvecex, myvecex2>::value);
Is it doable in C++ at all?