template <typename T>
class buffer
Defined at line 1746 of file ../../third_party/fmtlib/src/include/fmt/base.h
A contiguous memory buffer with an optional growing ability. It is an
internal class and shouldn't be used directly, only via `memory_buffer`.
Public Methods
void buffer<T> (const buffer<T> & )
Defined at line 1778 of file ../../third_party/fmtlib/src/include/fmt/base.h
void operator= (const buffer<T> & )
Defined at line 1779 of file ../../third_party/fmtlib/src/include/fmt/base.h
T * begin ()
Defined at line 1781 of file ../../third_party/fmtlib/src/include/fmt/base.h
T * end ()
Defined at line 1782 of file ../../third_party/fmtlib/src/include/fmt/base.h
const T * begin ()
Defined at line 1784 of file ../../third_party/fmtlib/src/include/fmt/base.h
const T * end ()
Defined at line 1785 of file ../../third_party/fmtlib/src/include/fmt/base.h
size_t size ()
Returns the size of this buffer.
Defined at line 1788 of file ../../third_party/fmtlib/src/include/fmt/base.h
size_t capacity ()
Returns the capacity of this buffer.
Defined at line 1791 of file ../../third_party/fmtlib/src/include/fmt/base.h
T * data ()
Returns a pointer to the buffer data (not null-terminated).
Defined at line 1794 of file ../../third_party/fmtlib/src/include/fmt/base.h
const T * data ()
Defined at line 1795 of file ../../third_party/fmtlib/src/include/fmt/base.h
void clear ()
Clears this buffer.
Defined at line 1798 of file ../../third_party/fmtlib/src/include/fmt/base.h
void try_resize (size_t count)
Tries resizing the buffer to contain `count` elements. If T is a POD type
the new elements may not be initialized.
Defined at line 1802 of file ../../third_party/fmtlib/src/include/fmt/base.h
void try_reserve (size_t new_capacity)
Tries increasing the buffer capacity to `new_capacity`. It can increase the
capacity by a smaller amount than requested but guarantees there is space
for at least one additional element either by increasing the capacity or by
flushing the buffer if it is full.
Defined at line 1811 of file ../../third_party/fmtlib/src/include/fmt/base.h
void push_back (const T & value)
Defined at line 1815 of file ../../third_party/fmtlib/src/include/fmt/base.h
template <typename U>
void append (const U * begin, const U * end)
Defined at line 1825 of file ../../third_party/fmtlib/src/include/fmt/base.h
template <typename Idx>
T & operator[] (Idx index)
Defined at line 1842 of file ../../third_party/fmtlib/src/include/fmt/base.h
template <typename Idx>
const T & operator[] (Idx index)
Defined at line 1846 of file ../../third_party/fmtlib/src/include/fmt/base.h
Protected Methods
void buffer<T> (grow_fun grow, size_t sz)
Don't initialize ptr_ since it is not accessed to save a few cycles.
Defined at line 1758 of file ../../third_party/fmtlib/src/include/fmt/base.h
void buffer<T> (grow_fun grow, T * p, size_t sz, size_t cap)
Defined at line 1761 of file ../../third_party/fmtlib/src/include/fmt/base.h
void ~buffer<T> ()
Defined at line 1765 of file ../../third_party/fmtlib/src/include/fmt/base.h
void buffer<T> (buffer<T> && )
Defined at line 1766 of file ../../third_party/fmtlib/src/include/fmt/base.h
void set (T * buf_data, size_t buf_capacity)
Sets the buffer data and capacity.
Defined at line 1769 of file ../../third_party/fmtlib/src/include/fmt/base.h