52 [[nodiscard]] constexpr auto
is_full(
std::
size_t ) const noexcept ->
bool {
60 [[nodiscard]]
constexpr auto max_size() const noexcept ->
std::optional<
std::
size_t> {
68 [[nodiscard]]
static constexpr auto is_bounded() noexcept ->
bool {
78 return std::numeric_limits<std::size_t>::max();
115 [[nodiscard]]
constexpr auto is_full(std::size_t current_size)
const noexcept ->
bool {
123 [[nodiscard]]
constexpr auto max_size() const noexcept ->
std::optional<
std::
size_t> {
131 [[nodiscard]]
static constexpr auto is_bounded() noexcept ->
bool {
140 [[nodiscard]]
constexpr auto remaining_capacity(std::size_t current_size)
const noexcept -> std::size_t {
186 std::optional<std::size_t> max = std::nullopt) noexcept
194 [[nodiscard]]
constexpr auto is_full(std::size_t current_size)
const noexcept ->
bool {
198 return current_size >=
max_size_.value();
205 [[nodiscard]]
constexpr auto max_size() const noexcept ->
std::optional<
std::
size_t> {
213 [[nodiscard]]
constexpr auto is_bounded() const noexcept ->
bool {
222 [[nodiscard]]
constexpr auto remaining_capacity(std::size_t current_size)
const noexcept -> std::size_t {
224 return std::numeric_limits<std::size_t>::max();
Policy that limits queue size to a maximum.
constexpr bounded_policy(std::size_t max) noexcept
Construct bounded policy with max size.
constexpr auto remaining_capacity(std::size_t current_size) const noexcept -> std::size_t
Get remaining capacity.
auto set_max_size(std::size_t new_max) noexcept -> void
Set new maximum size.
constexpr auto is_full(std::size_t current_size) const noexcept -> bool
Check if queue is at capacity.
constexpr auto max_size() const noexcept -> std::optional< std::size_t >
Get maximum size.
static constexpr auto is_bounded() noexcept -> bool
Check if this is a bounded policy.
Policy with dynamically adjustable size limit.
auto set_unbounded() noexcept -> void
Remove size limit (become unbounded)
constexpr dynamic_bounded_policy(std::optional< std::size_t > max=std::nullopt) noexcept
Construct with optional max size.
std::optional< std::size_t > max_size_
auto set_max_size(std::size_t new_max) noexcept -> void
Set new maximum size.
constexpr auto is_full(std::size_t current_size) const noexcept -> bool
Check if queue is at capacity.
constexpr auto max_size() const noexcept -> std::optional< std::size_t >
Get maximum size.
constexpr auto is_bounded() const noexcept -> bool
Check if this is currently bounded.
constexpr auto remaining_capacity(std::size_t current_size) const noexcept -> std::size_t
Get remaining capacity.
Policy that allows unlimited queue size.
constexpr auto is_full(std::size_t) const noexcept -> bool
Check if queue is at capacity.
constexpr unbounded_policy() noexcept=default
Construct unbounded policy.
constexpr auto max_size() const noexcept -> std::optional< std::size_t >
Get maximum size.
constexpr auto remaining_capacity(std::size_t) const noexcept -> std::size_t
Get remaining capacity.
static constexpr auto is_bounded() noexcept -> bool
Check if this is a bounded policy.
Tag type for bound policy identification.