$ make
g++-13 -std=c++20 -static -DNDEBUG -march=native -c -o attack.o attack.cpp
In file included from attack.h:2,
from attack.cpp:1:
bitboard.h: In function ‘void zobrist::init()’:
bitboard.h:461:36: error: cannot bind non-const lvalue reference of type ‘long long unsigned int&’ to a value of type ‘long unsigned int’
461 | for (unsigned long long& j : i) j = RandU64();
| ^
bitboard.h:464:34: error: cannot bind non-const lvalue reference of type ‘long long unsigned int&’ to a value of type ‘long unsigned int’
464 | for (unsigned long long& i : castling) i = RandU64();
| ^~~~~~~~
bitboard.h:465:34: error: cannot bind non-const lvalue reference of type ‘long long unsigned int&’ to a value of type ‘long unsigned int’
465 | for (unsigned long long& i : en_passant) i = RandU64();
| ^~~~~~~~~~
make: *** [<builtin>: attack.o] Error 1
note: in makefile i had to change g++ version to g++-13, otherwise many other errors came ..
i get these errors :
note: in
makefile
i had to changeg++
version tog++-13
, otherwise many other errors came ..[ i'm on Xubuntu 22.04 ]