This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
template template template parameters
- From: "Andreas Hennings" <Andreas-He at web dot de>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 28 Oct 2003 18:31:42 +0100
- Subject: template template template parameters
- Organization: http://freemail.web.de/
Hi
I think template template template parameters are a very useful tool to make your code as abstract and universal as possible.
The problem is that my compiler, g++, doesn't seem to share my enthusiasm and refuses to compile my templates
// I declared these classes and functions:
// ...
template class TSegment, class TElem, class TOut = TElem>
class SegmentedPath;
// ...
template
class SplineSegment;
// ...
class Vec2d;
// ...
template class, class, class> class TSegPath,
class TElem, class TOut = TElem>
void calc_splines_curve(TSegPath&, bool, int, int);
// The problem occurs as soon as I call this function, using the code
// ...
SegmentedPath spl;
// ...
calc_splines_curve(spl, true, 0, 10);
// or, as an alternative
calc_splines_curve (spl, true, 0, 10);
// where true, 0, 10 are not that important for the error
/*
the error reads:
fraser [17:37] polyliner 125) g++ -o testio testio.cpp ioplus.cpp
calc_splines.cpp: In function `void calc_splines_curve TSeg, class TElem, class TOut = TElem> SegmentedPath, Vec2d, Vec2d>(SegmentedPath &, bool, int, int)':
testio.cpp:47: instantiated from here
calc_splines.cpp:140: Internal compiler error.
calc_splines.cpp:140: Please submit a full bug report.
calc_splines.cpp:140: Internal compiler error:
calc_splines.cpp:140: See for instructions.
*/
does anyone have an idea to this?
greetings, a.h
______________________________________________________________________________
Horoskop, Comics, VIPs, Wetter, Sport und Lotto im WEB.DE Screensaver1.2
Kostenlos downloaden: http://screensaver.web.de/?mc=021110