boost::double_ended::devector_growth_policy
// In header: <boost/double_ended/devector.hpp> struct devector_growth_policy { // types typedef unsigned int size_type; // public static functions static size_type new_capacity(size_type); static bool should_shrink(size_type, size_type, size_type); };
Controls a devectors reallocation policy.
Models the GrowthPolicy
concept of the devector class.
devector_growth_policy
public static functionsstatic size_type new_capacity(size_type capacity);
Returns: 4 times the old capacity or 16 if it's 0.
Parameters: |
|
static bool should_shrink(size_type size, size_type capacity, size_type small_buffer_size);
Returns: true, if the contents fit in the small buffer.
Parameters: |
|