summaryrefslogtreecommitdiff
path: root/include/leveldb/cache.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/cache.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/cache.h')
-rw-r--r--include/leveldb/cache.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/leveldb/cache.h b/include/leveldb/cache.h
index ed18baa..145ad69 100644
--- a/include/leveldb/cache.h
+++ b/include/leveldb/cache.h
@@ -32,7 +32,10 @@ LEVELDB_EXPORT Cache* NewLRUCache(size_t capacity);
class LEVELDB_EXPORT Cache {
public:
- Cache() { }
+ Cache() = default;
+
+ Cache(const Cache&) = delete;
+ Cache& operator=(const Cache&) = delete;
// Destroys all existing entries by calling the "deleter"
// function that was passed to the constructor.
@@ -100,10 +103,6 @@ class LEVELDB_EXPORT Cache {
struct Rep;
Rep* rep_;
-
- // No copying allowed
- Cache(const Cache&);
- void operator=(const Cache&);
};
} // namespace leveldb