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

fmtlog fails a test with fmtlib 11+ #4120

Closed
Arniiiii opened this issue Aug 15, 2024 · 2 comments
Closed

fmtlog fails a test with fmtlib 11+ #4120

Arniiiii opened this issue Aug 15, 2024 · 2 comments

Comments

@Arniiiii
Copy link

Arniiiii commented Aug 15, 2024

Hello. I'm just a guy that wanted to use fmtlog .

I've updated cmake for it long ago.

But now I wanted to update it a little bit more: make it use latest fmtlib to extent to be usable, but with as less changes to code as possible.

First of all I've changed fmtlib to current latest version.
Then I got that fmt::detail::throw_format_error now is fmt::throw_format_error . Just fixed.

Then I've build tests.

And now I have a test fails to compile. It seems to be a const issue.

Here's godbolt with selected code with the problem: https://godbolt.org/z/YYbTMM7hT

It fails with versions of fmtlib greater or equal 11.0.0

My attempt to make fmtlog usable from cmake: https://github.com/Arniiiii/fmtlog_cmake_fix , test is enc_dec_test.cc

The question: how should it be solved?

@mwinterb
Copy link
Contributor

This formatter's format function will need to be const, which is compatible with 10.2.1:
https://github.com/MengRao/fmtlog/blob/acd521b1a64480354136a745c511358da1ec7dc5/test/enc_dec_test.cc#L46

See: #3447

Arniiiii added a commit to Arniiiii/fmtlog_cmake_fix that referenced this issue Aug 15, 2024
@Arniiiii
Copy link
Author

This formatter's format function will need to be const, which is compatible with 10.2.1: https://github.com/MengRao/fmtlog/blob/acd521b1a64480354136a745c511358da1ec7dc5/test/enc_dec_test.cc#L46

See: #3447

Yep, you are right, making the method const, seems to work. Thanks.

GerHobbelt pushed a commit to GerHobbelt/fmtlog that referenced this issue Nov 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

No branches or pull requests

2 participants