Need to include <algorithm> for std::reverse.