logging: fix compiler compatibility for one more constexpr function
[folly.git] / folly / experimental / LockFreeRingBuffer.h
index 1a2bc464c7c17bc2a16a481f11b787790794a7a0..0e32e033ed716a22665c29e898b8f232672c1a22 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.
@@ -18,7 +18,6 @@
 
 #include <atomic>
 #include <boost/noncopyable.hpp>
-#include <iostream>
 #include <cmath>
 #include <memory>
 #include <string.h>
@@ -204,7 +203,8 @@ public:
   bool waitAndTryRead(T& dest, uint32_t turn) noexcept {
     uint32_t desired_turn = (turn + 1) * 2;
     Atom<uint32_t> cutoff(0);
-    if(!sequencer_.tryWaitForTurn(desired_turn, cutoff, false)) {
+    if (sequencer_.tryWaitForTurn(desired_turn, cutoff, false) !=
+        TurnSequencer<Atom>::TryWaitResult::SUCCESS) {
       return false;
     }
     memcpy(&dest, &data, sizeof(T));