add #include <algorithm> in includes.h.