Struct ResourceLimitedContainerConfig

Struct Documentation

struct ResourceLimitedContainerConfig

Specifies the configuration of a resource limited collection.

Public Functions

inline  ResourceLimitedContainerConfig (size_t ini=0, size_t max=std::numeric_limits< size_t >::max dummy_avoid_winmax(), size_t inc=1u)

Public Members

size_t initial = 0

Number of elements to be preallocated in the collection.

size_t maximum   = std::numeric_limits<size_t>::max dummy_avoid_winmax ()

Maximum number of elements allowed in the collection.

size_t increment = 1u

Number of items to add when capacity limit is reached.

Public Static Functions

static inline ResourceLimitedContainerConfig fixed_size_configuration(size_t size)

Return a resource limits configuration for a fixed size collection.

Parameters

size – Number of elements to allocate.

Returns

Resource limits configuration.

static inline ResourceLimitedContainerConfig dynamic_allocation_configuration(size_t increment = 1u)

Return a resource limits configuration for a linearly growing, dynamically allocated collection.

Parameters

increment – Number of new elements to allocate when increasing the capacity of the collection.

Returns

Resource limits configuration.