Chromium Code Reviews| Index: base/memory/manual_constructor.h |
| diff --git a/base/memory/manual_constructor.h b/base/memory/manual_constructor.h |
| index 56081a1d3bc5362a6797a2aeca2d2516f74689f6..561a2e6ff748078f46b85531d6358be878914cf8 100644 |
| --- a/base/memory/manual_constructor.h |
| +++ b/base/memory/manual_constructor.h |
| @@ -54,8 +54,12 @@ class ManualConstructor { |
| inline const Type& operator*() const { return *get(); } |
| template <typename... Ts> |
| - inline void Init(const Ts&... params) { |
| - new(space_.void_data()) Type(params...); |
| + inline void Init(Ts&&... params) { |
| + new(space_.void_data()) Type(std::forward<Ts>(params)...); |
| + } |
| + |
| + inline void Move(ManualConstructor<Type>&& o) { |
|
danakj
2016/02/27 00:32:02
std::move() means you're moving the object, this i
btolsch
2016/02/27 01:18:37
Done.
|
| + Init(std::move(*o)); |
| } |
| inline void Destroy() { |