Just for those who'd like to compile the program from source themselves (I used MinGW and its included mingw32-make command to use the Makefile provided):
in the common.h file, line 134-156:
template<typename T>
inline T get(istream& in) {
T val;
read(in, &val, sizeof(T));
return val;
}
inline void read(istream& in, void* const p, int const size) {
in.read(static_cast<char* const>(p), size);
}
template<typename T>
inline void read(istream& in, T& out) {
read(in, &out, sizeof(T));
}
template<typename T>
inline void read(istream& in, vector<T>& out) {
read(in, out.data(), vsize(out));
}
template<typename T>
inline void read(istream& in, vector<vector<T>>& out) {
for (vector<T>& v : out)
read(in, v);
}
You need to declare the get method after the read methods in order to be able to compile.
So you would have to replace previous code with:
inline void read(istream& in, void* const p, int const size) {
in.read(static_cast<char* const>(p), size);
}
template<typename T>
inline void read(istream& in, T& out) {
read(in, &out, sizeof(T));
}
template<typename T>
inline void read(istream& in, vector<T>& out) {
read(in, out.data(), vsize(out));
}
template<typename T>
inline void read(istream& in, vector<vector<T>>& out) {
for (vector<T>& v : out)
read(in, v);
}
template<typename T>
inline T get(istream& in) {
T val;
read(in, &val, sizeof(T));
return val;
}