-
Notifications
You must be signed in to change notification settings - Fork 2
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
Issues with new Fmt support #36
Comments
Hi, sorry for not getting back to you earlier. Give me until tomorrow to investigate the issues that you are having and I will try to formulate a plan for how they can be resolved. |
It took a little while for me to remember why I put the arguments in a tuple and thus had to use |
OK, I figured there was probably a good reason you were doing things that way! It turned out the real issue is I have this at the top of my cpp source file.
The compiler was trying to use std::invoke rather than your I'm probably going to refactor to avoid
|
Sure, I can do that. |
The CMake issue turned out to be a bit more complex than I thought which is partially to blame why I did not see this issue in my testing. The FMT library (when installed from source) will also install the correct "FindFMT"-files for CMake to use. This is also true for some FMT Conan packages. However, it seems that some newer FMT Conan packages (including the "conan-center" ones) has lost the files that makes "find_package(fmt)" work properly. I will have to give it a bit more thought to figure out the best solution to this issue. |
This was somewhat more complicated than I thought and thus took much longer than I thought it would. Still, I think it is fixed now in PR #38. |
Brilliant, both fixes work in my setup! I thought you resolved this really quickly, many thanks. |
Perhaps I'm misunderstanding how this intended to be built but I found that when I build the latest version with conan it doesn't find the fmt library even when I have the fmt package in my conan dependencies.
If I add this to
cmake/Findfmt.cmake
then it works: https://github.com/ceph/ceph/blob/master/cmake/modules/Findfmt.cmakeUnfortunately that repo is LGPL which is possibly incompatible with your license but we can probably write something from scratch or source from another project to get the same result.
edit: I also get long compiler errors from the use of
minimal::apply
inFmtMsg
using gcc 6.5.0 with-std=c++1z
which I would have expected to work if only C++14 features are required.I'm really more of a C programmer so once things get heavy with templates I'm often a bit lost. But is there a reason to use
minimal::apply
? My best guess was you had trouble capturingargs
so ended up using a tuple. But I found that this compiles under--std=gnu++14
and seems to run correctly. Is what I've done here OK or are there cases it wouldn't work?Happy to prepare a PR if there's a solution that works for everyone here.
The text was updated successfully, but these errors were encountered: