Index: base/optional.h |
diff --git a/base/optional.h b/base/optional.h |
index 988767cfe32cf4916bf5aa3272ebd271f1dc73c1..b468964ae339fbead38f769dd315ff39a008d054 100644 |
--- a/base/optional.h |
+++ b/base/optional.h |
@@ -240,20 +240,20 @@ class Optional { |
private: |
void Init(const T& value) { |
DCHECK(storage_.is_null_); |
- new (storage_.buffer_.template data_as<T>()) T(value); |
+ new (storage_.buffer_.void_data()) T(value); |
krasin
2016/06/15 06:24:13
Right. Before new is called, storage_buffer contai
ortuno
2016/06/15 14:32:27
Thanks for the explanation!
|
storage_.is_null_ = false; |
} |
void Init(T&& value) { |
DCHECK(storage_.is_null_); |
- new (storage_.buffer_.template data_as<T>()) T(std::move(value)); |
+ new (storage_.buffer_.void_data()) T(std::move(value)); |
storage_.is_null_ = false; |
} |
template <class... Args> |
void Init(Args&&... args) { |
DCHECK(storage_.is_null_); |
- new (storage_.buffer_.template data_as<T>()) T(std::forward<Args>(args)...); |
+ new (storage_.buffer_.void_data()) T(std::forward<Args>(args)...); |
storage_.is_null_ = false; |
} |