-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Constexpr basic_string_view #24
Comments
Hi @andrewerf, sorry for not getting back to this sooner. This is a good issue to raise, but unfortunately not one with a clear-cut solution, which is why it is the way it is currently. As you have noticed, In C++17, If a new Ultimately I figured the best way to work around this is to simply require users to define a If you have any other suggested ways of dealing with this outside of what I mentioned above, I would be interested to discuss and possibly implement it -- but otherwise my best recommendation would just be to own a custom |
Checklist
Description
The bpstd::basic_string_view uses std::char_traits as a background. This produces a error in a constexpr context:
error: call to non-'constexpr' function 'static std::size_t std::char_traits<char>::length(const char_type*)'
.This is correspond to the standard because char_traits::length is marked constexpr since C++17 only.
P.S. Idk whether it's a bug or a feature request.
The text was updated successfully, but these errors were encountered: