summaryrefslogtreecommitdiff
path: root/include/leveldb/slice.h
diff options
context:
space:
mode:
authorcostan <costan@google.com>2018-03-21 00:47:18 -0700
committerVictor Costan <pwnall@chromium.org>2018-03-21 01:17:59 -0700
commit74f032ff6f2465160366d865b1bb89a45dc2046b (patch)
treef8180f20b6d85fc70a8e3054c3ce46732dfa3c0e /include/leveldb/slice.h
parent8e75db8623703cdc25ec3cd06f82129296672489 (diff)
downloadleveldb-74f032ff6f2465160366d865b1bb89a45dc2046b.tar.gz
leveldb: Require C++11.
This CL switches the public headers to C++11 default and deleted constructors, and adds override to the relevant leveldb::EnvWrapper methods. This should be a good test for C++11 compiler support. Once this CL settles, the rest of the codebase can be safely modernized to C++11. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=189873212
Diffstat (limited to 'include/leveldb/slice.h')
-rw-r--r--include/leveldb/slice.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/leveldb/slice.h b/include/leveldb/slice.h
index b56a4e4..a86e8a6 100644
--- a/include/leveldb/slice.h
+++ b/include/leveldb/slice.h
@@ -37,6 +37,10 @@ class LEVELDB_EXPORT Slice {
// Create a slice that refers to s[0,strlen(s)-1]
Slice(const char* s) : data_(s), size_(strlen(s)) { }
+ // Intentionally copyable.
+ Slice(const Slice&) = default;
+ Slice& operator=(const Slice&) = default;
+
// Return a pointer to the beginning of the referenced data
const char* data() const { return data_; }
@@ -81,8 +85,6 @@ class LEVELDB_EXPORT Slice {
private:
const char* data_;
size_t size_;
-
- // Intentionally copyable
};
inline bool operator==(const Slice& x, const Slice& y) {