#ifndef BITBOARD_H_INCLUDED
#define BITBOARD_H_INCLUDED
+#include <algorithm>
+#include <cassert>
+#include <cmath>
+#include <cstdint>
+#include <cstdlib>
#include <string>
#include "types.h"
inline int edge_distance(File f) { return std::min(f, File(FILE_H - f)); }
-/// attacks_bb(Square) returns the pseudo attacks of the give piece type
+/// attacks_bb(Square) returns the pseudo attacks of the given piece type
/// assuming an empty board.
template<PieceType Pt>
union { Bitboard bb; uint16_t u[4]; } v = { b };
return PopCnt16[v.u[0]] + PopCnt16[v.u[1]] + PopCnt16[v.u[2]] + PopCnt16[v.u[3]];
-#elif defined(_MSC_VER) || defined(__INTEL_COMPILER)
+#elif defined(_MSC_VER)
- return (int)_mm_popcnt_u64(b);
+ return int(_mm_popcnt_u64(b));
#else // Assumed gcc or compatible compiler
/// lsb() and msb() return the least/most significant bit in a non-zero bitboard
-#if defined(__GNUC__) // GCC, Clang, ICC
+#if defined(__GNUC__) // GCC, Clang, ICX
inline Square lsb(Bitboard b) {
assert(b);