std::hive<T,Allocator>::block_capacity_limits
From cppreference.com
constexpr std::hive_limits block_capacity_limits() const noexcept;
|
(since C++26) | |
Returns current block capacity limits, that is, the current-limits.
Return value
An object of type std::hive_limits.
Complexity
Constant.
Example
Run this code
#include <hive>
#include <iostream>
int main()
{
std::hive<int> colony(100'500);
const auto limits{colony.block_capacity_limits()};
std::cout << limits.min << ' ' << limits.max << '\n';
}
Possible output:
76 255
See also
| returns the number of elements that can be held in currently allocated storage (public member function) | |
| reserves storage (public member function) | |
| reduces memory usage by freeing unused memory (public member function) | |
| deallocates reserved blocks and reduces capacity accordingly (public member function) | |
[static] |
returns block capacity default limits (public static member function) |
[static] |
returns block capacity hard limits (public static member function) |
[static] |
checks if given capacity hard limits are met (public static member function) |