-
Notifications
You must be signed in to change notification settings - Fork 58
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
lexical_cast
doesn't recognize std::string_view
or boost::string_view
#30
Comments
Is this still current? I have just used |
I think that it's still current, yes. Looking at https://godbolt.org/z/WMa7vhnT9, the function
goes directly to
take the generic path using a stream. Similarly, in https://godbolt.org/z/9W6M1c35e,
does a straight string copy, whereas
go through the slow stream path. |
Ah. I completely misunderstood the problem description then. It's not that the conversions aren't supported, it's that they don't generate optimal code. The negative examples might actually be good addition for the original description. |
Edited to supply the code examples in case the CE links disappear. |
Merged to master branch. Many thanks for the bug report! |
As per title;
lexical_cast
has specializations for string types, but not for string view types. Reported on the C++ Slack.The text was updated successfully, but these errors were encountered: