diff options
author | Henrik Edin <henrik.edin@mongodb.com> | 2018-11-21 10:56:47 -0500 |
---|---|---|
committer | Henrik Edin <henrik.edin@mongodb.com> | 2018-12-04 13:43:46 -0500 |
commit | 279fba2819e281053b19507e06b862b852d4e85f (patch) | |
tree | 68070313e69f04b677ce4e8ae66c0ddf40014860 /src/mongo/base/string_data.h | |
parent | cf8fbf54354a805f0bdb5bc4282c8081f4802971 (diff) | |
download | mongo-279fba2819e281053b19507e06b862b852d4e85f.tar.gz |
SERVER-38248 Change StringMap implementation to absl::flat_hash_map
Diffstat (limited to 'src/mongo/base/string_data.h')
-rw-r--r-- | src/mongo/base/string_data.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/base/string_data.h b/src/mongo/base/string_data.h index 3f33683e335..213a55564d4 100644 --- a/src/mongo/base/string_data.h +++ b/src/mongo/base/string_data.h @@ -104,6 +104,10 @@ public: */ constexpr friend StringData operator"" _sd(const char* c, std::size_t len); + explicit operator std::string() const { + return toString(); + } + /** * Constructs a StringData with begin and end iterators. begin points to the beginning of the * string. end points to the position past the end of the string. In a null-terminated string, |