-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge 'json_formatter: Make formatter::write work for std::pair' from…
… Stephan Dollberg Previously the un/associative container overloads for `formatter::write` were broken because it failed to find an overload for `write(output_stream, pair)`. To fix this we make the `write(output_stream<char>&, state, Iter, Iter)` overload actually `write(output_stream, state, pair)` so that the existing overload that handles `pair` can be found. Further we fix the fallback `write(output_stream, state, T)` overload to call `formatter::write` recursively with the state stripped instead of calling `to_json`. This keeps the recursive zero-copy nature of `formatter::write` intact. All of the above mirrors how the existing overloads for `to_json` already work. Adds some tests as well. Closes #2440 * github.com:scylladb/seastar: json_formatter: Add tests for formatter::write json_formatter: Make formatter::write work for std::pair
- Loading branch information
Showing
2 changed files
with
58 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters