
15 May
2010
15 May
'10
12:14 a.m.
Dear boost users, I'm clearly missing something w.r.t. mpl_inherit and lamba functions. Could someone enlighten me as to why the following code fails to compile? The integer template argument in the lambda expression seems to be the cause? //-------------------------- #include <boost/mpl/inherit.hpp> #include <boost/mpl/inherit_linearly.hpp> #include <boost/mpl/placeholders.hpp> #include <boost/mpl/vector.hpp> using namespace boost; using namespace boost::mpl::placeholders; template <int C, class T> struct Wrap { T value; }; typedef mpl::vector< int, long
myMemberTypes;
typedef mpl::inherit_linearly< myMemberTypes, mpl::inherit<_1, Wrap<5, _2> > >::type MyClass; //-------------------------- Many thanks, Peter