[SOLVED] Are memory orders for each atomic correct in this lock-free SPSC ring buffer queue?

Issue I have a ring buffer that looks like: template<class T> class RingBuffer { public: bool Publish(); bool Consume(T& value); bool IsEmpty(std::size_t head, std::size_t tail); bool IsFull(std::size_t head, std::size_t tail); private: std::size_t Next(std::size_t slot); std::vector<T> buffer_; std::atomic<std::size_t> tail_{0}; std::atomic<std::size_t> head_{0};

Continue reading