Index: webrtc/base/scoped_ptr.h |
diff --git a/webrtc/base/scoped_ptr.h b/webrtc/base/scoped_ptr.h |
index 203a00138e62de3a2473b8fd4efcfb6cb4311d29..6f1898fcc995ee37463b4df3e8203400339dbe98 100644 |
--- a/webrtc/base/scoped_ptr.h |
+++ b/webrtc/base/scoped_ptr.h |
@@ -103,6 +103,7 @@ |
#include <stdlib.h> |
#include <algorithm> // For std::swap(). |
+#include <cstddef> |
#include "webrtc/base/constructormagic.h" |
#include "webrtc/base/template_util.h" |
@@ -342,7 +343,7 @@ class scoped_ptr { |
scoped_ptr(element_type* p, const D& d) : impl_(p, d) {} |
// Constructor. Allows construction from a nullptr. |
- scoped_ptr(decltype(nullptr)) : impl_(nullptr) {} |
+ scoped_ptr(std::nullptr_t) : impl_(nullptr) {} |
// Constructor. Allows construction from a scoped_ptr rvalue for a |
// convertible type and deleter. |
@@ -379,7 +380,7 @@ class scoped_ptr { |
// operator=. Allows assignment from a nullptr. Deletes the currently owned |
// object, if any. |
- scoped_ptr& operator=(decltype(nullptr)) { |
+ scoped_ptr& operator=(std::nullptr_t) { |
reset(); |
return *this; |
} |
@@ -499,7 +500,7 @@ class scoped_ptr<T[], D> { |
explicit scoped_ptr(element_type* array) : impl_(array) {} |
// Constructor. Allows construction from a nullptr. |
- scoped_ptr(decltype(nullptr)) : impl_(nullptr) {} |
+ scoped_ptr(std::nullptr_t) : impl_(nullptr) {} |
// Constructor. Allows construction from a scoped_ptr rvalue. |
scoped_ptr(scoped_ptr&& other) : impl_(&other.impl_) {} |
@@ -512,7 +513,7 @@ class scoped_ptr<T[], D> { |
// operator=. Allows assignment from a nullptr. Deletes the currently owned |
// array, if any. |
- scoped_ptr& operator=(decltype(nullptr)) { |
+ scoped_ptr& operator=(std::nullptr_t) { |
reset(); |
return *this; |
} |