boost::capy::dynamic_buffer

dynamic_buffer overloads

Synopses

Create a dynamic buffer from a vector.

template<
    class T,
    class Allocator>
requires std::is_fundamental_v<T> && (sizeof(T) == 1)
basic_vector_dynamic_buffer<T, Allocator>
dynamic_buffer(
    std::vector<T, Allocator>& v,
    std::size_t max_size = std::size_t(‐1));

Create a dynamic buffer from a string.

template<
    class CharT,
    class Traits,
    class Allocator>
basic_string_dynamic_buffer<CharT, Traits, Allocator>
dynamic_buffer(
    std::basic_string<CharT, Traits, Allocator>& s,
    std::size_t max_size = std::size_t(‐1));

Return Value

  • A vector_dynamic_buffer wrapping the vector.

  • A string_dynamic_buffer wrapping the string.

Parameters

Name Description

v

The vector to wrap. Element type must be a fundamental type with sizeof 1.

max_size

Optional maximum size limit.

s

The string to wrap.

Created with MrDocs