[mpl] Alexandrescu's hierarchy generators
Greetings! Does boost.mpl provide type hierarchy generators like GenScatterHierarchy and GenLinearHierarchy as described in "Modern C++ Design"? I must confess I do not understand the mpl completely yet ;-) Best regards, Klaus
"Klaus Nowikow"
Greetings!
Does boost.mpl provide type hierarchy generators like GenScatterHierarchy and GenLinearHierarchy as described in "Modern C++ Design"? I must confess I do not understand the mpl completely yet ;-)
Well, yeah. It's just a thin wrapper over mpl::fold
// inherit_linearly.hpp
template<
typename Types_
, typename Node_
, typename Root_ = empty_base
>
struct inherit_linearly
: fold
::type lin;
or:
#include
::type scat;
HTH. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com
participants (2)
-
David Abrahams
-
Klaus Nowikow