boost::capy::make_buffer

Return a buffer from a std::vector with a maximum size.

Synopsis

template<
    class T,
    class Allocator>
requires std::is_trivially_copyable_v<T>
[[nodiscard]]
mutable_buffer
make_buffer(
    std::vector<T, Allocator>& data,
    std::size_t max_size) noexcept;

Return Value

a buffer from a std::vector with a maximum size.

Created with MrDocs