diff options
Diffstat (limited to 'absl/types/optional.h')
-rw-r--r-- | absl/types/optional.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/absl/types/optional.h b/absl/types/optional.h index fd185f353f3e..d800ca684267 100644 --- a/absl/types/optional.h +++ b/absl/types/optional.h @@ -295,7 +295,7 @@ class optional_data<T, false> : public optional_data_base<T> { optional_data() = default; - optional_data(const optional_data& rhs) { + optional_data(const optional_data& rhs) : optional_data_base<T>() { if (rhs.engaged_) { this->construct(rhs.data_); } @@ -303,7 +303,8 @@ class optional_data<T, false> : public optional_data_base<T> { optional_data(optional_data&& rhs) noexcept( absl::default_allocator_is_nothrow::value || - std::is_nothrow_move_constructible<T>::value) { + std::is_nothrow_move_constructible<T>::value) + : optional_data_base<T>() { if (rhs.engaged_) { this->construct(std::move(rhs.data_)); } |