From 0415cf235000c449ea986a2c46641f6787c8da90 Mon Sep 17 00:00:00 2001 From: dominicpoeschko <45942148+dominicpoeschko@users.noreply.github.com> Date: Wed, 19 Feb 2020 14:59:50 +0100 Subject: [PATCH] add const begin and end overload to buffer (#1553) * 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 35c6414c7c74..1bb587930cc8 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_; }