diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/base/string_data.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mongo/base/string_data.h b/src/mongo/base/string_data.h index 3a42b5d971a..08dca1f4068 100644 --- a/src/mongo/base/string_data.h +++ b/src/mongo/base/string_data.h @@ -98,6 +98,7 @@ namespace mongo { size_t size() const { fillSize(); return _size; } bool empty() const { return size() == 0; } string toString() const { return string(data(), size()); } + char operator[] ( unsigned pos ) const { return _data[pos]; } private: const char* const _data; // is always null terminated, but see "notes" above |