2 May
2005
2 May
'05
2:09 p.m.
Hello all, Given a mpl::list typedef mpl::list<structA, structB, structC> typeList; and a wrapper struct template <class T> struct wrap { virtual void someFunction(T&) = 0; virtual ~wrap } You can generate a class by mpl::inherit_linearly<typeList, mpl::inherit<wrap<_2>,_1> >:;type generated; This is pretty much straight from "C++ Template Metaprogramming" pg. 193-194. My question is how do you generate the derived concrete class? I can override any particular function by struct Child : public generated { virtual void someFunction(structA&); } but I can't seem to generate an entire class. I apologize if this is a newbie question, but alas I am a newbie to template metaprogramming. Regards, Rick Sloan