![]() |
WPILibC++ 2025.3.1
|
A contiguous memory buffer with an optional growing ability. More...
#include <fmt/base.h>
Public Types | |
using | value_type = T |
using | const_reference = const T& |
Public Member Functions | |
buffer (const buffer &)=delete | |
void | operator= (const buffer &)=delete |
auto | begin () noexcept -> T * |
auto | end () noexcept -> T * |
auto | begin () const noexcept -> const T * |
auto | end () const noexcept -> const T * |
constexpr auto | size () const noexcept -> size_t |
Returns the size of this buffer. | |
constexpr auto | capacity () const noexcept -> size_t |
Returns the capacity of this buffer. | |
FMT_CONSTEXPR auto | data () noexcept -> T * |
Returns a pointer to the buffer data (not null-terminated). | |
FMT_CONSTEXPR auto | data () const noexcept -> const T * |
FMT_CONSTEXPR void | clear () |
Clears this buffer. | |
FMT_CONSTEXPR void | try_resize (size_t count) |
FMT_CONSTEXPR void | try_reserve (size_t new_capacity) |
FMT_CONSTEXPR void | push_back (const T &value) |
template<typename U > | |
FMT_CONSTEXPR20 void | append (const U *begin, const U *end) |
Appends data to the end of the buffer. | |
template<typename Idx > | |
FMT_CONSTEXPR auto | operator[] (Idx index) -> T & |
template<typename Idx > | |
FMT_CONSTEXPR auto | operator[] (Idx index) const -> const T & |
Protected Member Functions | |
FMT_CONSTEXPR | buffer (grow_fun grow, size_t sz) noexcept |
constexpr | buffer (grow_fun grow, T *p=nullptr, size_t sz=0, size_t cap=0) noexcept |
FMT_CONSTEXPR20 | ~buffer ()=default |
buffer (buffer &&)=default | |
FMT_CONSTEXPR void | set (T *buf_data, size_t buf_capacity) noexcept |
Sets the buffer data and capacity. | |
A contiguous memory buffer with an optional growing ability.
It is an internal class and shouldn't be used directly, only via memory_buffer
.
using detail::buffer< T >::const_reference = const T& |
using detail::buffer< T >::value_type = T |
|
inlineprotectednoexcept |
|
inlineconstexprprotectednoexcept |
|
protecteddefault |
|
protecteddefault |
|
delete |
|
inline |
Appends data to the end of the buffer.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
Returns the capacity of this buffer.
|
inline |
Clears this buffer.
|
inlinenoexcept |
|
inlinenoexcept |
Returns a pointer to the buffer data (not null-terminated).
|
inlinenoexcept |
|
inlinenoexcept |
|
delete |
|
inline |
|
inline |
|
inline |
|
inlineprotectednoexcept |
Sets the buffer data and capacity.
|
inlineconstexprnoexcept |
Returns the size of this buffer.
|
inline |
|
inline |