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

Compiler warning with gcc-9 shipped with Fedora 30 #1077

Closed
bsergean opened this issue May 15, 2019 · 5 comments · Fixed by #1213
Closed

Compiler warning with gcc-9 shipped with Fedora 30 #1077

bsergean opened this issue May 15, 2019 · 5 comments · Fixed by #1213

Comments

@bsergean
Copy link
Contributor

Here is the error.

/tmp/cmake/ws/../third_party/spdlog/include/spdlog/fmt/bundled/format.h:3475:55: warning: ISO C++ did not adopt string literal operator templates taking an argument pack of characters [-Wpedantic]
 3475 | FMT_CONSTEXPR internal::udl_formatter<Char, CHARS...> operator""_format() {
      |                                                       ^~~~~~~~

If someone has an idea I can help to validate the fix.

@gabime
Copy link
Owner

gabime commented May 15, 2019

This is part of the fmtlib code. Seems it has already been reported here.

@bsergean
Copy link
Contributor Author

bsergean commented May 16, 2019 via email

@DennisOSRM
Copy link

Ah thanks for the link. It looks like they have fixed the problem so whenever you guys update fmtlib this should be fixed.

@gabime Would it be possible to cut a new release s.t. other projects depending on it can upgrade?

@gabime
Copy link
Owner

gabime commented Jun 3, 2019

This will have to wait for official fmt release - some time after june 17: fmtlib/fmt#1160 (comment)

@limitedAtonement
Copy link

limitedAtonement commented Jul 1, 2019

Please update when that fmt release is ready and spdlog compiles again. In the meantime, I did:

diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h
index 1bb24a5..a4dc1e1 100644
--- a/include/spdlog/fmt/bundled/format.h
+++ b/include/spdlog/fmt/bundled/format.h
@@ -126,7 +126,7 @@ FMT_END_NAMESPACE
       FMT_GCC_VERSION >= 407 || FMT_MSC_VER >= 1900) && \
       (!(FMT_ICC_VERSION || FMT_CUDA_VERSION) || \
        FMT_ICC_VERSION >= 1500 || FMT_CUDA_VERSION >= 700)
-#  define FMT_USE_USER_DEFINED_LITERALS 1
+#  define FMT_USE_USER_DEFINED_LITERALS 0
 # else
 #  define FMT_USE_USER_DEFINED_LITERALS 0
 # endif
I couldn't figure out a way to do this by setting #defines.

bachittle pushed a commit to bachittle/spdlog that referenced this issue Dec 22, 2022
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 a pull request may close this issue.

4 participants