aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/stubs/statusor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/stubs/statusor.h')
-rw-r--r--src/google/protobuf/stubs/statusor.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/google/protobuf/stubs/statusor.h b/src/google/protobuf/stubs/statusor.h
index ad848701..29f869ad 100644
--- a/src/google/protobuf/stubs/statusor.h
+++ b/src/google/protobuf/stubs/statusor.h
@@ -224,7 +224,7 @@ inline StatusOr<T>& StatusOr<T>::operator=(const StatusOr<T>& other) {
template<typename T>
template<typename U>
inline StatusOr<T>::StatusOr(const StatusOr<U>& other)
- : status_(other.status_), value_(other.status_.ok() ? other.value_ : NULL) {
+ : status_(other.status_), value_(other.status_.ok() ? other.value_ : T()) {
}
template<typename T>