Index: base/optional.h |
diff --git a/base/optional.h b/base/optional.h |
index a32e06808d82cd7b75b66009880d891e4d62fceb..528610aa8e7a39c3f8808f9615cc1c6746d2f461 100644 |
--- a/base/optional.h |
+++ b/base/optional.h |
@@ -34,7 +34,8 @@ namespace internal { |
template <typename T, bool = base::is_trivially_destructible<T>::value> |
struct OptionalStorage { |
- constexpr OptionalStorage() {} |
+ // Initializing |empty_| here to avoid errors in g++ 4.8. |
+ constexpr OptionalStorage() : empty_('\0') {} |
constexpr explicit OptionalStorage(const T& value) |
: is_null_(false), value_(value) {} |
@@ -67,7 +68,8 @@ struct OptionalStorage { |
template <typename T> |
struct OptionalStorage<T, true> { |
- constexpr OptionalStorage() {} |
+ // Initializing |empty_| here to avoid errors in g++ 4.8. |
+ constexpr OptionalStorage() : empty_('\0') {} |
constexpr explicit OptionalStorage(const T& value) |
: is_null_(false), value_(value) {} |