ok, as i said, i dont really "need" this, but it would be very convinient for my purpose.
The thing is i have this bitset<64>, well, actually alot of them, and i need to set some specific bits. If i fx. wanted to set the 32 most significant bit, this would (in thery) be easy done by: Bs = 0xFFFFFFFF00000000ll, however, even though the compiler doesnt complain about it, it still doesnt work, in this maner it will only manipulate the lower 32 bits.
When all is said, it is not important, i just wanted to know if there was something there could be done. anyhow, i have a little code to show, not very complicated, but somewhat messy.
Code: Select all
#include <bitset>
class T {
enum {P, B, N, R, Q, K};
std::bitset<64> White[6], Black[6];
public:
T() {
for(int i = 1; i < 64; i += 8)
White[P][i] = 1;
for(int i = 6; i < 64; i += 8)
Black[P][i] = 1;
White[R][0] = 1;
White[R][56] = 1;
Black[R][7] = 1;
Black[R][63] = 1;
White[N][8] = 1;
White[N][48] = 1;
Black[N][15] = 1;
Black[N][55] = 1;
White[B][16] = 1;
White[B][40] = 1;
Black[B][23] = 1;
Black[B][47] = 1;
White[Q][24] = 1;
Black[Q][31] = 1;
White[K][32] = 1;
Black[K][39] = 1;
}
~T() {}
} BitBoard;
I for one doesnt like the way this is looking. I probably could make it look a little better by turning the bitboard 90 degrees, but not much, and i dont wanna do that.