From 29b3f471cff3779ca35f6207bd9bedd066470b6d Mon Sep 17 00:00:00 2001 From: gabime Date: Tue, 17 Sep 2019 12:28:02 +0300 Subject: [PATCH] Added const vecsion to circula_q::front() --- include/spdlog/details/circular_q.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/spdlog/details/circular_q.h b/include/spdlog/details/circular_q.h index 06bb3627..d937b4f5 100644 --- a/include/spdlog/details/circular_q.h +++ b/include/spdlog/details/circular_q.h @@ -62,6 +62,11 @@ public: // Return reference to the front item. // If there are no elements in the container, the behavior is undefined. + const T& front() const + { + return v_[head_]; + } + T& front() { return v_[head_];