|
Boost Users : |
Subject: Re: [Boost-users] Metaprogramming + Multiple Inheritance?
From: Joachim Faulhaber (afojgo_at_[hidden])
Date: 2011-09-04 17:02:00
2011/9/4 Hossein Haeri <powerprogman_at_[hidden]>
>
> Dear all,
>
> I am looking for problems a reasonable design for solving which
> requires mixing (template/preprocessor) metaprogramming and
> multiple inheritance, say for a single class.
The combination of multiple inheritance and generic programming using
templates is described in the book
Andrei Alexandrescu (2001) Modern C++ Design.
and is called "Policy-Based Design" there.
> In particular, has
> any part of the Boost library been designed with this mixture?
As far as I know, mixing multiple inheritance with meta programming
techniques in general and Policy-Based Design in particular is not a
major trend in boost (others may correct me, if I'm wrong).
More dominant are designs using static polymorphism via
metaprogramming without (multiple) inheritance based on the notion of
"concepts". Such designs are working similar to the approach described
in
Jaakko Järvi, et.al: Concept-Controlled Polymorphism
see
https://parasol.tamu.edu/~jarvi/papers/concept-controlled.pdf
HTH
Joachim
-- Interval Container Library [Boost.Icl] http://www.joachim-faulhaber.de
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