[Bug libstdc++/78156] constexpr basic_string_view::basic_string_view(const charT *) calls non-constexpr char_traits::length

suokkos at gmail dot com gcc-bugzilla@gcc.gnu.org
Sat Oct 29 21:34:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78156

--- Comment #2 from Pauli <suokkos at gmail dot com> ---
Maybe this isn't exactly defect. But constexpr is hard beast to get right in
any code.

For user code simplest workaround would be remembering to use operator""sv
everywhere. Too bad accessing those operator seems to be hard. I guess I need
configure time check for that and provide my own fallback if the sv operator is
missing.


More information about the Gcc-bugs mailing list