Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Bitboards generate moves King, Knight

Author: Gerd Isenberg

Date: 09:35:16 09/21/04

Go up one level in this thread


On September 21, 2004 at 12:18:43, Peter Fendrich wrote:

>- snip -
>>Another nice C++ solution for compile time constants is to use integer templates
>>like:
>>
>>template<int color> BitBoard pushPawn (BitBoard pawns)
>>{
>>   if ( color ) return pawns >> 8;
>>   return pawns << 8;
>>}
>>
>>Gerd
>
>Excuse my ignorance but if you use this template, once for white and once for
>black, will the compiler compress this to just one return-stmt each?
>
>/Peter

Sorry forget to mention that MSC6 seems to have problams with int templates.
I guess newer ms compiler will work correct as gcc does.

Gerd




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.