This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Heavy use of C++ templates in gcc-2.95 fails
- To: gcc at gcc dot gnu dot org
- Subject: Heavy use of C++ templates in gcc-2.95 fails
- From: Joerg Pommnitz <pommnitz at darmstadt dot gmd dot de>
- Date: Mon, 09 Aug 1999 12:32:48 +0200
- Organization: GMD
Ulrich W. Eisenecker and Krzysztof Czarnecki developed
a C++ programming technique that they call
Template-Metaprogramming. Sample code is available from
http://www.prakinf.tu-ilmenau.de/~czarn/meta/metactrl
http://www.prakinf.tu-ilmenau.de/~czarn/meta/metaxmpl.cpp
And documentation from
http://home.t-online.de/home/Ulrich.Eisenecker/meta.htm
"metactrl" is a header file that provides control
structures and "metaxmpl.cpp" is an example using
metactrl.
The header file claims, that
// This implementation uses member templates and has been tested with the
// Microsoft Visual C++ 5.0 compiler. Partial specialization and partial ordering of
// templates are not used.
The compilation failes with gcc-2.95. Could one of the
G++ wizards at least take a look at the problem? The code
looks fine to me, but I'm not a C++ language lawyer...
BTW, the concept is really interesting. You might want
to look at the code from pure curiosity. The authors will
publish a book with "Addison Wesley" that might become a
classic like "Design Patterns". It would be nice if one could
use their ideas and code with gcc.
--
Regards
Joerg
GMD-IPSI, Dolivostr. 15, Zimmer 120, D-64293 Darmstadt
+49-6151-869-786 (Phone), -818 (FAX)