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

Added formatter for std::source_location #3730

Merged
merged 3 commits into from
Nov 30, 2023

Conversation

felix642
Copy link
Contributor

Added custom formatter for std::source_location to support this type of code :

fmt::print("{}\n", std::source_location::current());

The format was taken from the following discussion : #3012 (comment)
Let me know if there is a better format that could be implemented.

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!

include/fmt/std.h Outdated Show resolved Hide resolved
include/fmt/std.h Outdated Show resolved Hide resolved
@felix642 felix642 force-pushed the std_source_location_formatter branch from d447537 to 45ca5e9 Compare November 28, 2023 20:45
@felix642 felix642 marked this pull request as draft November 28, 2023 22:20
@felix642
Copy link
Contributor Author

Pipeline seems to fail on windows, I'll have a look and mark the PR as ready for review when the pipeline will be ok.

@felix642 felix642 force-pushed the std_source_location_formatter branch from ce50030 to 54eaa8c Compare November 29, 2023 04:32
@felix642 felix642 marked this pull request as ready for review November 29, 2023 04:33
@felix642 felix642 requested a review from vitaut November 29, 2023 04:33
include/fmt/std.h Outdated Show resolved Hide resolved
include/fmt/std.h Outdated Show resolved Hide resolved
include/fmt/std.h Outdated Show resolved Hide resolved
@vitaut vitaut merged commit 99b9fbf into fmtlib:master Nov 30, 2023
40 checks passed
@vitaut
Copy link
Contributor

vitaut commented Nov 30, 2023

Merged, thanks!

@felix642 felix642 deleted the std_source_location_formatter branch November 30, 2023 18:08
happymonkey1 pushed a commit to happymonkey1/fmt that referenced this pull request Apr 7, 2024
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