From: Praveen Kumar <cpp.fool@gmail.com>
Date: Wed, 10 Jun 2015 22:21:07 +0000 (-0700)
Subject: Fix libc++ use
X-Git-Tag: v0.47.0~44
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=86b19dbf8eebc88b09cbe3b94c49893cfc86d2b5;p=folly.git

Fix libc++ use

Summary: Use of std::max from libc++ resulted in error.
std::max found type of its arguments diffrent
whereas it expected them to be same.
This diff fix the error.
Closes #223

Reviewed By: @yfeldblum

Differential Revision: D2144639

Pulled By: @sgolemon
---

diff --git a/folly/io/async/AsyncServerSocket.cpp b/folly/io/async/AsyncServerSocket.cpp
index 8520f464..34fa5c6f 100644
--- a/folly/io/async/AsyncServerSocket.cpp
+++ b/folly/io/async/AsyncServerSocket.cpp
@@ -726,8 +726,8 @@ void AsyncServerSocket::handlerReady(
 
     std::chrono::time_point<std::chrono::steady_clock> nowMs =
       std::chrono::steady_clock::now();
-    int64_t timeSinceLastAccept = std::max(
-      int64_t(0),
+    auto timeSinceLastAccept = std::max<int64_t>(
+      0,
       nowMs.time_since_epoch().count() -
       lastAccepTimestamp_.time_since_epoch().count());
     lastAccepTimestamp_ = nowMs;