I'm trying something new using mpl's inherit_linearly but I can't
figure out how to do what I want to do.
The idea, simply:
template<typename Policies>
class Test : public inherit_linearly
David Greene
I'm trying something new using mpl's inherit_linearly but I can't figure out how to do what I want to do.
The idea, simply:
template<typename Policies> class Test : public inherit_linearly
>::type { public: void do_something(void) { for each Base in Policies Base::do_something(); rof } }; Is there a straightforward way to do this or am I thinking about this in the wrong way?
See mpl::for_each:
template<typename Policies>
class Test
: public inherit_linearly
David Abrahams wrote:
Is there a straightforward way to do this or am I thinking about this in the wrong way?
See mpl::for_each:
Ah, good. I was worried I might have to write my own specialized inherit<>.
http://www.boost-consulting.com/mplbook covers this topic.
Left my copy at home today. :) Thanks! -Dave
participants (2)
-
David Abrahams
-
David Greene