-
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
Implementation of basic_string_view clashes with std #686
Comments
There is an implicit conversion from Line 240 in 84e520b
fmt::format(std::string_view("{}"), 42); provided that |
I’m using clang 5 in macOS it didn’t work until I removed the custom basic_string_view; and apparently it did detect it. |
Hmm, according to godbolt Could you post a reproducible example and the full error message? |
Done! Probably detection isn’t lacking, since std::string_view is available since c++14 in clang 4 and 5. Simply change to |
C++14 doesn't have |
...well, I’m successfully using std::string_view all over the place in clang 4 and 5 c++14, so I guess we could support it too, couldn’t we? |
What compiler flags do you use? |
libc++ supports it in C++14, and apparently back to C++03, see
abseil/abseil-cpp#2
…On Wed, Mar 21, 2018, 18:32 Victor Zverovich ***@***.***> wrote:
What compiler flags do you use? std::string_view is not supported with
-std=c++14: https://godbolt.org/g/LLKw3P
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#686 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABCB7wo5Z4KRtC6_XvM5fMqBM4F10E0nks5tgv8UgaJpZM4Sy6FP>
.
|
Fixed, thanks for reporting! |
I had to remove the implementation of
std::basic_string_view
for pre-C++17 since it didn't allow me to pass string_view object tofmt
, it said (it didn't know how to convert frombasic_string_view
tobasic_string_view
). After that, it worked.The text was updated successfully, but these errors were encountered: