How do I call std::min when min has already been defined as a macro?
Use #undef min in your code, after #include <> directives.
#include <...> // bad header that defines `min` macro
#ifdef min
#undef min
#endif
// rest f code.
Addendum: If you need to keep the value of the min macro afterwards, you can disable its definition temporarily using a non-portable solution on some compilers.  For instance, Microsoft's C++ compiler has a push_macro pragma that also seems to be supported by GCC.