Compiler bugs?

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Compiler bugs?

Post by Sven »

stegemma wrote:
Sven Schüle wrote:...
Does clsString use templates? That would explain it. Enabling implicit template instantiation through a compiler switch would be an alternative solution in that case.

Sven
clsString use templates indirectly (in other classes) but all the template code is in headers. Maybe i can check if somewhere there are template code defined outside the headers.
Are you using the -fno-implicit-templates switch of g++, or any other switch related to templates?

In general, I am not 100% sure whether the behaviour you have described is really related to templates, but at least it sounds as if it might be the case.

Is clsString derived from a specialized class template? E.g.

Code: Select all

class clsString &#58; public myTemplateClass<char>;
In that case a definition like your

Code: Select all

clsString sDummy;
would imply an explicit template instantation (albeit an indirect one). The question is why it would be needed under Windows but not on Mac.

Sven