Explicitly template instantiate `std::min/max` in a couple places
[folly.git] / folly / MemoryMapping.cpp
index 3d8e3a55bf2aeaef44477261133c40a353fbe98f..e09c391ef5729f3ad70d7f65b0aeb7388c4add9f 100644 (file)
@@ -311,7 +311,7 @@ void MemoryMapping::advise(int advice, size_t offset, size_t length) const {
   }
 
   length = (length + options_.pageSize - 1) & ~(options_.pageSize - 1);
-  length = std::min(length, mapLength_ - offset);
+  length = std::min<size_t>(length, mapLength_ - offset);
 
   char* mapStart = static_cast<char*>(mapStart_) + offset;
   PLOG_IF(WARNING, ::madvise(mapStart, length, advice)) << "madvise";