|
Boost Users : |
Subject: Re: [Boost-users] boost::mpl::inherit from a typelist?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-07-21 11:13:36
AMDG
Zachary Turner wrote:
> typedef boost::mpl::inherit<boost::mpl::list<udt1, udt2, udt3> >::type
> derived_class;
>
> (at least in MSVC) then it inherits directly from boost::mpl::list,
> instead of inheriting from the individual members of the list. Is
> there a way to make it inherit from each type in the list instead?
> inherit_linearly appears to accept anything modelling the
> ForwardSequence concept as its template argument, so it seems like
> inherit should do the same unless I'm just missing something.
>
mpl::inherit is a simple metafunction that inherits
from all its arguments. mpl::inherit_linearly is
a thin wrapper around mpl::fold.
In Christ,
Steven Watanabe
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net