Spec-Zone.ru › C++

std::hive<T,Allocator>::block_capacity_hard_limits

static constexpr std::hive_limits block_capacity_hard_limits() noexcept;
(since C++26)

Returns implementation defined block capacity hard limits.

Return value

An object of type std::hive_limits.

Complexity

Constant.

Example

#include <hive>
#include <iostream>

int main()
{
    constexpr auto limits{std::hive<int>::block_capacity_hard_limits()};
    std::cout << limits.min << ' ' << limits.max << '\n';
}

Possible output:

3 255

See also

capacity
returns the number of elements that can be held in currently allocated storage
(public member function)
reserve
reserves storage
(public member function)
shrink_to_fit
reduces memory usage by freeing unused memory
(public member function)
trim_capacity
deallocates reserved blocks and reduces capacity accordingly
(public member function)
block_capacity_limits
returns current block capacity limits
(public member function)
block_capacity_default_limits
[static]
returns block capacity default limits
(public static member function)
is_within_hard_limits
[static]
checks if given capacity hard limits are met
(public static member function)

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/cpp/container/hive/block_capacity_hard_limits

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API