Boost >=1.69 implementation of max_size() calls this function which does NOT take into account the maximum size of the allocator.
Boost <= 1.68 implementation of max_size() was calling this function from boost::container which does take into account the maximum size of the allocator.
The relevant commit is ca3d667 @glenfe
As a result, when using a custom allocator with limited size MY_MAX_SIZE, previous calls to max_size() would return MY_MAX_SIZE, but they will now return (std::numeric_limits<size_type>::max)() / sizeof(value_type)
Boost >=1.69 implementation of
max_size()calls this function which does NOT take into account the maximum size of the allocator.Boost <= 1.68 implementation of
max_size()was calling this function fromboost::containerwhich does take into account the maximum size of the allocator.The relevant commit is ca3d667 @glenfe
As a result, when using a custom allocator with limited size
MY_MAX_SIZE, previous calls tomax_size()would returnMY_MAX_SIZE, but they will now return(std::numeric_limits<size_type>::max)() / sizeof(value_type)