Skip to content

Implement fmt::format_to into std::vector<char>#4211

Merged
vitaut merged 2 commits intofmtlib:masterfrom
phprus:issue-4206
Oct 26, 2024
Merged

Implement fmt::format_to into std::vector<char>#4211
vitaut merged 2 commits intofmtlib:masterfrom
phprus:issue-4206

Conversation

@phprus
Copy link
Copy Markdown
Contributor

@phprus phprus commented Oct 21, 2024

Fix for issue #4206

Copy link
Copy Markdown
Contributor

@vitaut vitaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Overall looks good, but let's simplify this a bit (see the inline comment).

typename T, typename InputIt, typename OutputIt,
FMT_ENABLE_IF(
is_back_insert_iterator<OutputIt>::value&& has_container_append<
decltype(get_container(std::declval<OutputIt>())), InputIt>::value)>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move get_container to the trait?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
@vitaut vitaut merged commit 168df9a into fmtlib:master Oct 26, 2024
@vitaut
Copy link
Copy Markdown
Contributor

vitaut commented Oct 26, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants