KEMBAR78
Allow allocators for output_vector_adapter by nlohmann · Pull Request #2989 · nlohmann/json · GitHub
Skip to content

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