Problems building Couchbase-lite-C w/ CMake on Windows

Sounds like a missing include … try adding #include <algorithm> at the top of the file, and let me know if it fixes the problem.