diff --git a/include/gsl/string_span b/include/gsl/string_span index fa8b515..3c40aaa 100644 --- a/include/gsl/string_span +++ b/include/gsl/string_span @@ -98,7 +98,7 @@ namespace details { if (str == nullptr || n <= 0) return 0; - span str_span{str, n}; + const span str_span{str, n}; std::ptrdiff_t len = 0; while (len < n && str_span[len]) len++;