operator<<(os, pos) does not need to access any private members of pos.
No functional change.
Resolves #492
}
os << "\nFen: " << pos.fen() << "\nKey: " << std::hex << std::uppercase
}
os << "\nFen: " << pos.fen() << "\nKey: " << std::hex << std::uppercase
- << std::setfill('0') << std::setw(16) << pos.st->key << std::dec << "\nCheckers: ";
+ << std::setfill('0') << std::setw(16) << pos.key() << std::dec << "\nCheckers: ";
for (Bitboard b = pos.checkers(); b; )
os << UCI::square(pop_lsb(&b)) << " ";
for (Bitboard b = pos.checkers(); b; )
os << UCI::square(pop_lsb(&b)) << " ";
- friend std::ostream& operator<<(std::ostream&, const Position&);
-
public:
static void init();
public:
static void init();
+extern std::ostream& operator<<(std::ostream& os, const Position& pos);
+
inline Color Position::side_to_move() const {
return sideToMove;
}
inline Color Position::side_to_move() const {
return sideToMove;
}