Boost logo

Boost :

From: Mat Marcus (mmarcus_at_[hidden])
Date: 2002-11-15 11:55:34


Scatter hierarchies can be achieved by using inherit_linearly
together with mpl::inherit. See the second example that Aleksey
cited *is* an example of a scatter hierarchy.

<http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/boost/boost/lib
s/mpl/example/inherit_multiply.cpp?rev=1.1&content-type=text/vn
d.viewcvs-markup>

--On Friday, November 15, 2002 5:28 PM +0100 Dirk Gerrits
<dirk_at_[hidden]> wrote:

> Aleksey Gurtovoy wrote:
>
>> Rozental, Gennadiy wrote:
>>
>> > Also is there gen_scattered/linear_hierarchy implementation
>> > somewhere for MPL sequenses?
>>
>>
>> MPL's 'inherit_linearly' algorithm + 'inherit' metafunction
>> (in the CVS now)
>> cover both of these. Please see
>> http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/bo
>> ost/boost/libs/m pl/example/inherit_linearly.cpp and
>> http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/bo
>> ost/boost/libs/m pl/example/inherit_multiply.cpp for the
>> corresponding examples.
>
> This is some very cool stuff!
>
> However, the way I understand it, inherit_linearly takes a
> type sequence (like mpl::list) as an argument and inherit
> takes the types themselves as arguments. I'd like to have an
> inherit that takes a type sequence as an argument, instead of
> or in addition to the current inherit. This is because I need
> to do some Modern-C++-Design-ish stuff which needs a
> scattered hierarchy instead of a linear one.
>
> Regards,
> Dirk Gerrits
>
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk