@conference {119, title = {A Solution to the Constructor-Problem of Mixin-Based Programming in C++}, booktitle = {GCSE{\textquoteright}2000 Workshop on C++ Template Programming}, year = {2000}, month = {10/2000}, address = {Erfurt, Germany}, abstract = {Mixin-Based Programming in C++ is a powerful programming style based on the parameterized inheritance idiom and the composition of C++ templates. Type expressions describing specific inheritance hierarchies can be composed either automatically using generative programming idioms in C++ or manually. Unfortunately, the mixin-based C++ programming techniques published to date do not adequately support optional and alternative mixin classes with constructors expecting varying numbers of arguments, which are common in practice. This is because the varying base class constructors do not provide a uniform interface on which the constructors of the derived classes could rely. This paper discusses several partial solutions to this problem that were proposed to date and presents a new, complete solution. The new solution uses generative programming techniques to automatically generate the appropriate constructors, and this way it avoids the overhead and clumsiness of instantiating composed mixin classes in the client code using the partial solutions. In fact, the new solution allows users to instantiate automatically composed mixin classes with the simplicity of instantiating concrete classes from traditional class hierarchies. Finally, the new solution does not suffer from the scalability problems of the partial solutions.}, url = {http://www.oonumerics.org/tmpw00/eisenecker.pdf}, author = {Ulrich, Eisenecker and Blinn, Frank and Krzysztof Czarnecki} }