-
Notifications
You must be signed in to change notification settings - Fork 29
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
string_view interoperability #45
Conversation
@timblechmann Does this solve your problem? |
b1a1b7a
to
3155dc8
Compare
@pdimov Did I break anything here? 😆 |
I have no idea. You should use the Boost.Config macro for the detection of Why are the tests predicated on "HAS_STRING_VIEW"? Why not always use |
Good questions. We probably need a better name for the macro.
It uses the Boost.Config macro at first and then there's the logic with The above includes the header but doesn't set the macro yet because there are cases where the header is available but the class is not defined. So there's a separate
This macro should probably be In that case, the member functions constrained on |
The |
What's the best alternative for the standalone library? Replicating the logic for |
The best alternative is to drop the standalone library, although I suppose you could also check |
Yes. That's outside the scope of my power.
I saw that boost.config relies on |
They still don't. |
3155dc8
to
613317e
Compare
613317e
to
39f55c7
Compare
fix #26
This PR includes interoperability with
std::string_view
andcore::string_view
.std::string_view
is enabled not only for standalone mode now. This means the string_view operations are now independent of the defaultstatic_strings::basic_string_view
type.core::string_view
now allows conversions from and to more types thanboost::string_view
. This is especially useful whenstd::string_view
is unavailable.boost::string_view
is maintained. Removing it would break things. For instance, any typeT
convertible toboost::string_view
, like we have in unit tests.std::string
has been implemented as the library does not include<string>