Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
alexkaratarakis opened this issue Aug 15, 2019 · 3 comments
Assignees

Comments

@alexkaratarakis
Copy link

@alexkaratarakis alexkaratarakis commented Aug 15, 2019

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)

@glenfe

This comment has been minimized.

Copy link
Member

@glenfe glenfe commented Aug 15, 2019

I'll take care of it for Boost 1.72

@glenfe glenfe self-assigned this Aug 15, 2019
@glenfe

This comment has been minimized.

Copy link
Member

@glenfe glenfe commented Aug 15, 2019

@alexkaratarakis 7be41ca should address this. We're almost ready to ship 1.71, so the earliest it will be released is 1.72.

@alexkaratarakis

This comment has been minimized.

Copy link
Author

@alexkaratarakis alexkaratarakis commented Aug 15, 2019

Thanks for the swift response and fix!

@glenfe glenfe closed this Aug 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.