|
RavEngine
|
#include <format.h>
Public Types | |
| using | value_type = T |
| using | const_reference = const T & |
Public Types inherited from detail::buffer< T > | |
| using | value_type = T |
| using | const_reference = const T & |
Public Member Functions | |
| FMT_CONSTEXPR20 | basic_memory_buffer (const Allocator &alloc=Allocator()) |
| FMT_CONSTEXPR20 | basic_memory_buffer (basic_memory_buffer &&other) noexcept |
| auto | operator= (basic_memory_buffer &&other) noexcept -> basic_memory_buffer & |
| auto | get_allocator () const -> Allocator |
| FMT_CONSTEXPR20 void | resize (size_t count) |
| void | reserve (size_t new_capacity) |
| template<typename ContiguousRange > | |
| void | append (const ContiguousRange &range) |
Public Member Functions inherited from detail::buffer< T > | |
| 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 |
| constexpr auto | capacity () const noexcept -> size_t |
| FMT_CONSTEXPR auto | data () noexcept -> T * |
| FMT_CONSTEXPR auto | data () const noexcept -> const T * |
| void | clear () |
| 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 > | |
| void | append (const U *begin, const U *end) |
| template<typename Idx > | |
| FMT_CONSTEXPR auto | operator[] (Idx index) -> T & |
| template<typename Idx > | |
| FMT_CONSTEXPR auto | operator[] (Idx index) const -> const T & |
Additional Inherited Members | |
Protected Member Functions inherited from detail::buffer< T > | |
| FMT_CONSTEXPR20 | 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 |
| buffer (buffer &&)=default | |
| FMT_CONSTEXPR void | set (T *buf_data, size_t buf_capacity) noexcept |
\rst A dynamically growing memory buffer for trivially copyable/constructible types with the first SIZE elements stored in the object itself.
You can use the memory_buffer type alias for char instead.
Example**::
auto out = fmt::memory_buffer(); fmt::format_to(std::back_inserter(out), "The answer is {}.", 42);
This will append the following output to the out object:
.. code-block:: none
The answer is 42.
The output can be converted to an std::string with to_string(out). \endrst
|
inlinenoexcept |
\rst Constructs a :class:fmt::basic_memory_buffer object moving the content of the other object to it. \endrst
|
inlinenoexcept |
\rst Moves the content of the other basic_memory_buffer object to this one. \endrst
|
inline |
Increases the buffer capacity to new_capacity.
|
inline |
Resizes the buffer to contain count elements. If T is a POD type new elements may not be initialized.