Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/local-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ content:

ui:
bundle:
url: https://github.com/boostorg/website-v2-docs/releases/download/ui-master/ui-bundle.zip
url: https://github.com/boostorg/website-v2-docs/releases/download/ui-develop/ui-bundle.zip
snapshot: true

antora:
Expand Down
71 changes: 0 additions & 71 deletions include/boost/http_proto/detail/array_of_buffers.hpp

This file was deleted.

105 changes: 105 additions & 0 deletions include/boost/http_proto/detail/array_of_const_buffers.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
//
// Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
// Copyright (c) 2025 Mohammad Nejati
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Official repository: https://github.com/cppalliance/http_proto
//

#ifndef BOOST_HTTP_PROTO_DETAIL_ARRAY_OF_BUFFERS_HPP
#define BOOST_HTTP_PROTO_DETAIL_ARRAY_OF_BUFFERS_HPP

#include <boost/buffers/const_buffer.hpp>

#include <cstdint>

namespace boost {
namespace http_proto {
namespace detail {

class array_of_const_buffers
{
public:
using value_type = buffers::const_buffer;
using iterator = value_type*;
using const_iterator = iterator;

array_of_const_buffers() = default;
array_of_const_buffers(
array_of_const_buffers const&) = default;
array_of_const_buffers&
operator=(array_of_const_buffers const&) = default;

array_of_const_buffers(
value_type* p,
std::uint16_t n) noexcept;

bool
empty() const noexcept
{
return size_ == 0;
}

std::uint16_t
size() const noexcept
{
return size_;
}

std::uint16_t
max_size() const noexcept
{
return cap_;
}

std::uint16_t
capacity() const noexcept
{
return cap_ - size_;
}

iterator
begin() const noexcept
{
return base_ + pos_;
}

iterator
end() const noexcept
{
return base_ + pos_ + size_;
}

value_type&
operator[](
std::uint16_t i) const noexcept
{
BOOST_ASSERT(i < cap_ - pos_);
return base_[i + pos_];
}

void
consume(std::size_t n);

void
reset(std::uint16_t n) noexcept;

void
slide_to_front() noexcept;

void append(value_type) noexcept;

private:
value_type* base_ = nullptr;
std::uint16_t cap_ = 0;
std::uint16_t pos_ = 0;
std::uint16_t size_ = 0;
};

} // detail
} // http_proto
} // boost

#endif
135 changes: 0 additions & 135 deletions include/boost/http_proto/detail/impl/array_of_buffers.hpp

This file was deleted.

Loading
Loading