Skip to content
forked from fmtlib/fmt

Commit

Permalink
Merge pull request #86 from fmtlib/master
Browse files Browse the repository at this point in the history
add const begin and end overload to buffer (fmtlib#1553)
  • Loading branch information
sthagen authored Feb 20, 2020
2 parents 55160dc + 0415cf2 commit 0fedfe5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/fmt/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_; }

Expand Down

0 comments on commit 0fedfe5

Please sign in to comment.