Exploring Template Template Parameters
|
The generic programming paradigm has exerted great influence on the recent development of C++, e.g., large parts
of its standard library are based on generic containers and algorithms. While templates, the language feature of
C++ that supports generic programming, have become widely used and well understood in the last years, one
aspect of templates has been mostly ignored: template template parameters. In the first part, this article
will present an in depth introduction of the new technique. The second part introduces a class for arbitrary
precision arithmetic, whose design is based on template template parameters. Finally, we end with a discussion of
the benefits and drawbacks of this new programming technique and how it applies to generic languages other than
C++ ...
Postscript Version (209kb),
PDF Version (169kb),
Online Version
The source code presented in the paper is available for
download here.
|