2011/9/4 Hossein Haeri
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