diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-03-20 09:30:52 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-03-20 09:30:52 +0000 |
commit | 1ac4a398c998d016d30f64a8a5072d80d2784abf (patch) | |
tree | 24b1e9af18b9a067731e9df608a777852ed9fd00 /vespalib | |
parent | 722ea7f065eaf28cbe3c27e0e8cafb53a7799980 (diff) |
Support gcc 11 std::string::size() not being constexpr.
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/vespa/vespalib/stllike/string.h | 2 |
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; |