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

Allow allocators for output_vector_adapter #2989

Merged
merged 3 commits into from
Sep 12, 2021
Merged

Allow allocators for output_vector_adapter #2989

merged 3 commits into from
Sep 12, 2021

Conversation

nlohmann
Copy link
Owner

@nlohmann nlohmann commented Aug 30, 2021

This PR allows to use vectors with custom allocators as output for binary formats.

  • Add tests
  • Check if output_vector_adapter can be generalized to arbitrary containers that support std::back_inserter.

Fixes #2982.

@nlohmann nlohmann added the aspect: binary formats BSON, CBOR, MessagePack, UBJSON label Aug 30, 2021
@nlohmann nlohmann self-assigned this Aug 30, 2021
@nlohmann nlohmann marked this pull request as draft August 30, 2021 16:49
@coveralls
Copy link

coveralls commented Aug 31, 2021

Coverage Status

Coverage remained the same at 100.0% when pulling 3a4f5a8 on issue2982 into bbdb29c on develop.

@nlohmann nlohmann marked this pull request as ready for review September 2, 2021 18:06
@nlohmann
Copy link
Owner Author

nlohmann commented Sep 2, 2021

I think I will not touch the second item in the task list as this would mean a greater refactoring of the output adapter class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

to_{binary format} does not provide a mechanism for specifying a custom allocator for the returned type.
2 participants