mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-24 12:14:26 +00:00
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
This commit is contained in:
parent
3bafd0749b
commit
0415cf2350
@ -633,6 +633,9 @@ template <typename T> class buffer {
|
|||||||
T* begin() FMT_NOEXCEPT { return ptr_; }
|
T* begin() FMT_NOEXCEPT { return ptr_; }
|
||||||
T* end() FMT_NOEXCEPT { return ptr_ + size_; }
|
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. */
|
/** Returns the size of this buffer. */
|
||||||
std::size_t size() const FMT_NOEXCEPT { return size_; }
|
std::size_t size() const FMT_NOEXCEPT { return size_; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user