Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: VC++6.0 - int template parameter

Author: Michel Langeveld

Date: 12:42:09 02/22/03

Go up one level in this thread


On February 22, 2003 at 15:22:06, Steffen Jakob wrote:

>I ported Hossa to MS Windows. I noticed a difference in the searched nodes
>between the linux version and the windows version. I use my own pseudo-random
>number generator. Therefore the behaviour should be deterministic and not depend
>on the used platform. After some debugging i found out that VC++6.0 seems to
>have problem with int template parameters which I use a lot. Look at the
>following example:
>
>// --------------------------------------------------
>#include <iostream>
>
>template <int S> inline void foo() {
>	std::cout << "S=" << S << std::endl;
>}
>
>int main(int argc, char **argv) {
>	foo<4>();
>	foo<10>();
>
>	return 0;
>}
>// --------------------------------------------------
>
>
>Here VC++6.0's output is
>
>S=10
>S=10
>
>while g++3.2 correctly says
>
>S=4
>S=10
>
>
>Is this a known bug?
>
>Greetings,
>Steffen.

Did u already tried the latest service pack (SP5?) ?
I had also some problems in MSVC with not working code ...
The SP's helped a bit and for other problems I had to find work arounds.




This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.