https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68133
Bug ID: 68133 Summary: constexpr basic_string_view(const _CharT* __str) Product: gcc Version: 5.2.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: d.v.a at ngs dot ru Target Milestone: --- Compilation of this code: #include<experimental/string_view> int main() { int arr[std::experimental::string_view("s").length()]; } produces error: error: ISO C++ forbids variable length array 'arr' [-Wvla] Constructor's implementation: constexpr basic_string_view(const _CharT* __str) : _M_len{__str == nullptr ? 0 : traits_type::length(__str)}, _M_str{__str} { } But traits_type::length() isn't constexpr