From a0d1ad00fd448618a393a84760a5bbc4c0bcebc1 Mon Sep 17 00:00:00 2001 From: dominicpoeschko <45942148+dominicpoeschko@users.noreply.github.com> Date: Sat, 15 Feb 2020 11:58:01 +0100 Subject: [PATCH] add const begin and end overload to buffer since there is a const overload for data I think there should also be one for begin and end --- include/fmt/core.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/fmt/core.h b/include/fmt/core.h index 35c6414c..85fdca29 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -633,6 +633,9 @@ template class buffer { T* begin() FMT_NOEXCEPT { return ptr_; } T* end() FMT_NOEXCEPT { return ptr_ + size_; } + const T * begin() const FMT_NOEXCEPT { return ptr_; } + const T * end() const FMT_NOEXCEPT { return ptr_ + size_; } + /** Returns the size of this buffer. */ std::size_t size() const FMT_NOEXCEPT { return size_; }