boost::capy::make_buffer

Return a buffer from a const std::array with a maximum size.

Synopsis

template<
    class T,
    std::size_t N>
requires std::is_trivially_copyable_v<T>
[[nodiscard]]
const_buffer
make_buffer(
    std::array<T, N> const& data,
    std::size_t max_size) noexcept;

Return Value

a buffer from a const std::array with a maximum size.

Parameters

Name Description

data

A standard container for storing a fixed size sequence of elements.

Created with MrDocs