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

memory: Add allocator_traits and deprecate old specialized version #61

Merged
merged 4 commits into from
Jan 4, 2020

Conversation

stotko
Copy link
Owner

@stotko stotko commented Jan 4, 2020

The containers use default_allocator_traits as well as the allocate() and deallocate() functions of its allocator directly. Although this approach was sufficient to relax several restrictions, it is inconsistent and does not reflect the desired behavior specified in the C++ standard. Introduce allocator_traits<Allocator> which resolves this problem and provide a standardized access the allocators. Deprecate the old default_allocator_traits which do not model the interface correctly. Note that the current implementation is oversimplified and always uses the fallback solution rather than detecting the capabilities of Allocator. Furthermore, this fixes an attribute issue in the recently introduced get_allocator() functions (see #56).

@stotko stotko added this to the 1.2.0 milestone Jan 4, 2020
@stotko stotko merged commit 82a7416 into master Jan 4, 2020
@stotko stotko deleted the allocator_traits branch January 4, 2020 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant