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
This commit is contained in:
dominicpoeschko 2020-02-15 11:58:01 +01:00 committed by GitHub
parent 3bafd0749b
commit a0d1ad00fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -633,6 +633,9 @@ template <typename T> 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_; }