Skip to content

[Regression] max_size() does not take the allocator's max_size() into account #29

Description

@alexkaratarakis

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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions