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

Fix detail::write with fallback formatter #1829

Merged
merged 6 commits into from
Aug 20, 2020
Merged

Fix detail::write with fallback formatter #1829

merged 6 commits into from
Aug 20, 2020

Conversation

alexezeder
Copy link
Contributor

@alexezeder alexezeder commented Aug 18, 2020

Recently I was trying to use both FMT_COMPILE() and struct with ostream operator, but with no luck. After first look on issues and pull requests I found one issue that describes the same problem, here it is - #1815.

I'm not sure that this solution is clean enough, but I am open to change whatever you want.

I agree that my contributions are licensed under the {fmt} license, and agree to future changes to the licensing.

to check fmt::to_string() with class that has output stream operator
to check fmt::format() with FMT_COMPILE() and class that has output stream operator
Copy link
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. Two comments, otherwise LGTM.

include/fmt/format.h Outdated Show resolved Hide resolved
test/compile-test.cc Outdated Show resolved Hide resolved
@alexezeder alexezeder requested a review from vitaut August 19, 2020 19:54
include/fmt/format.h Outdated Show resolved Hide resolved
@alexezeder alexezeder requested a review from vitaut August 20, 2020 01:06
@vitaut vitaut merged commit 1651b2d into fmtlib:master Aug 20, 2020
@vitaut
Copy link
Contributor

vitaut commented Aug 20, 2020

Thank you!

facebook-github-bot pushed a commit to facebookarchive/profilo that referenced this pull request Aug 28, 2020
Summary: Backport fmtlib/fmt#1829 to make sure that `fmt::to_string` supports streamable types.

Reviewed By: h-friederich

Differential Revision: D23387021

fbshipit-source-id: f538525a6fe2a296b508164f19a8bc0704183666
EduardoCostaom pushed a commit to EduardoCostaom/profilo that referenced this pull request Nov 2, 2022
Summary: Backport fmtlib/fmt#1829 to make sure that `fmt::to_string` supports streamable types.

Reviewed By: h-friederich

Differential Revision: D23387021

fbshipit-source-id: f538525a6fe2a296b508164f19a8bc0704183666
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