summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-03-20 09:30:52 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2023-03-20 09:30:52 +0000
commit1ac4a398c998d016d30f64a8a5072d80d2784abf (patch)
tree24b1e9af18b9a067731e9df608a777852ed9fd00
parent722ea7f065eaf28cbe3c27e0e8cafb53a7799980 (diff)
Support gcc 11 std::string::size() not being constexpr.
-rw-r--r--vespalib/src/vespa/vespalib/stllike/string.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/vespalib/src/vespa/vespalib/stllike/string.h b/vespalib/src/vespa/vespalib/stllike/string.h
index a393ab05113..d5482f4d39c 100644
--- a/vespalib/src/vespa/vespalib/stllike/string.h
+++ b/vespalib/src/vespa/vespalib/stllike/string.h
@@ -26,7 +26,7 @@ public:
constexpr stringref() noexcept : _s(""), _sz(0) { }
stringref(const char * s) noexcept : _s(s), _sz(strlen(s)) { }
constexpr stringref(const char * s, size_type sz) noexcept : _s(s), _sz(sz) { }
- constexpr stringref(const std::string & s) noexcept : _s(s.c_str()), _sz(s.size()) { }
+ stringref(const std::string & s) noexcept : _s(s.c_str()), _sz(s.size()) { }
stringref(const stringref &) noexcept = default;
stringref & operator =(const stringref &) noexcept = default;
stringref(stringref &&) noexcept = default;