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]

Re: Template Bug?


Hi Perry,

I added this after the first struct Definer template definition...

template <typename C, int cnt>
const C Definer<C,cnt>::d;

...and then it worked for me with or without NOT_WORKING.

After the partial specialization struct Definer <C, 0> definition...

template <typename C>
const C Definer<C,0>::d;

...but I'm not certain if it is necessary or not.  The code compiled with or
without it.  If it is necessary, GCC provided it as a gimme.  Or perhaps the
first template definition provided it.

HTH,
--Eljay


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