[MPL] How to Derive from inherit_linearly generated class?
Hello all,
Given a mpl::list
typedef mpl::list
Rick Sloan writes:
Hello all,
Given a mpl::list typedef mpl::list
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
,_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.
1) Unless there is a specific reason to prefer "mixing in" 'wrap<T>'
nodes (i.e. building 'inherit< wrap<T1>,inherit< wrap<T2>,...
inherit
participants (2)
-
Aleksey Gurtovoy
-
Rick Sloan