-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Make error #2140
Comments
Could you please provide compiler info? |
gcc 8.1.0 |
Looks like it should just work with the |
Thanks, this definitely helped. For some reason, this specific version of GCC is able to decay function pointers to void pointers, just like MSVC, so this branch should be disabled for this GCC version too: Lines 3837 to 3844 in 7e72673
You can check it locally just by commenting out the code above. But since I don't know how to make it in a more versatile way, I think we should just wait for more experienced people for proper fix. |
I think we could SFINAE this overload away on function to |
Actually there is another problem with But as far as I can see, following workarounds are able to satisfy all compilers - https://godbolt.org/z/Y8sadG. I'll create a PR with this code soon. |
Your suggestion worked! Thanks. |
fixes fmtlib#2140 - some GCC versions decay function pointers to `const void*`, exactly like MSVC does - legacy Clang (prior to 7.0) treats function pointers also as `const T*` pointers, but unable to convert them
fixes fmtlib#2140 - some GCC versions decay function pointers to `const void*`, exactly like MSVC does - legacy Clang (prior to 7.0) treats function pointers also as `const T*` pointers, but unable to convert them
fixes fmtlib#2140 - some GCC versions decay function pointers to `const void*`, exactly like MSVC does - legacy Clang (prior to 7.0) treats function pointers also as `const T*` pointers, but unable to convert them
Dear Concern,
While making the fmt, I am getting the following error:
Building CXX object test/CMakeFiles/format-test.dir/format-test.cc.o
/usr/local/src/fmt/test/format-test.cc:1487:20: error: call to 'ptr' is ambiguous
Would you please help me with it?
I am using Ubuntu 16.04
Thanks.
The text was updated successfully, but these errors were encountered: