Commit 693f6525 authored by Tullio Menga's avatar Tullio Menga Committed by Dominik Charousset

Patch empty() method for MSVC v140_clang_c2

std::atomic<T>::operator== is not standard and MSVC v140_clang_c2
can't always resolve cast to T. In such cases, we cannot explicitly
compare head_ == tail_, instead we have to compare load() results.
parent 049c2f12
...@@ -202,7 +202,7 @@ public: ...@@ -202,7 +202,7 @@ public:
// does not lock // does not lock
bool empty() const { bool empty() const {
// atomically compares first and last pointer without locks // atomically compares first and last pointer without locks
return head_ == tail_; return head_.load() == tail_.load();
} }
private: private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment