logging: fix compiler compatibility for one more constexpr function
[folly.git] / folly / MPMCPipeline.h
index c3d4bf17e04cf213387a278dce336d8ba1285e31..eca0b29b7fda3bc27b0ef97dab48e00e9345962d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -275,8 +275,9 @@ template <class In, class... Stages> class MPMCPipeline {
    * in any queue) are also counted.
    */
   ssize_t sizeGuess() const noexcept {
-    return (std::get<0>(stages_).writeCount() * kAmplification -
-            std::get<sizeof...(Stages)>(stages_).readCount());
+    return ssize_t(
+        std::get<0>(stages_).writeCount() * kAmplification -
+        std::get<sizeof...(Stages)>(stages_).readCount());
   }
 
  private: