This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

template template template parameters


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]