diff options
Diffstat (limited to 'deps/v8/src/base/lazy-instance.h')
-rw-r--r-- | deps/v8/src/base/lazy-instance.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/deps/v8/src/base/lazy-instance.h b/deps/v8/src/base/lazy-instance.h index 3ea5fc9575..75e5b06006 100644 --- a/deps/v8/src/base/lazy-instance.h +++ b/deps/v8/src/base/lazy-instance.h @@ -235,12 +235,13 @@ class LeakyObject { new (&storage_) T(std::forward<Args>(args)...); } + LeakyObject(const LeakyObject&) = delete; + LeakyObject& operator=(const LeakyObject&) = delete; + T* get() { return reinterpret_cast<T*>(&storage_); } private: typename std::aligned_storage<sizeof(T), alignof(T)>::type storage_; - - DISALLOW_COPY_AND_ASSIGN(LeakyObject); }; // Define a function which returns a pointer to a lazily initialized and never |