Author: Peter Fendrich
Date: 09:18:43 09/21/04
Go up one level in this thread
- 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
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.