diff options
author | Tor Egge <Tor.Egge@yahooinc.com> | 2023-03-20 11:40:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-20 11:40:14 +0100 |
commit | 3b399f5284d90e70417d381324f45396f92a6de1 (patch) | |
tree | 0ba6534437c2bc9f8b85cd4b4ef56fa1c3296e66 | |
parent | 24b297f12cdb8707d15ad554554eaaff76bcbdd3 (diff) | |
parent | 1ac4a398c998d016d30f64a8a5072d80d2784abf (diff) |
Merge pull request #26488 from vespa-engine/balder/handle-gcc11-string-size-non-constexpr
Support gcc 11 std::string::size() not being constexpr.
-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; |