summaryrefslogtreecommitdiff
path: root/third_party/base/nonstd_unique_ptr.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-22 14:44:49 -0800
committerLei Zhang <thestig@chromium.org>2015-12-22 14:44:49 -0800
commitba2586d2c0a50df14aa2549a0a841e1d4b9af4b6 (patch)
treed36be5c25b4e31db2ccd7fd1a28471fee575773d /third_party/base/nonstd_unique_ptr.h
parentbe9095d0b2819cdc88785b0b4fdfccf837eb96a9 (diff)
downloadpdfium-ba2586d2c0a50df14aa2549a0a841e1d4b9af4b6.tar.xz
Start using allowed C++11 features.
R=dml@google.com, thakis@chromium.org Review URL: https://codereview.chromium.org/1544923002 .
Diffstat (limited to 'third_party/base/nonstd_unique_ptr.h')
-rw-r--r--third_party/base/nonstd_unique_ptr.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/third_party/base/nonstd_unique_ptr.h b/third_party/base/nonstd_unique_ptr.h
index f519b345b1..f056e50397 100644
--- a/third_party/base/nonstd_unique_ptr.h
+++ b/third_party/base/nonstd_unique_ptr.h
@@ -74,18 +74,12 @@
#include <stdlib.h>
#include <ostream>
+#include <utility>
#include "template_util.h"
namespace nonstd {
-// Replacement for move, but doesn't allow things that are already
-// rvalue references.
-template <class T>
-T&& move(T& t) {
- return static_cast<T&&>(t);
-}
-
// Function object which deletes its parameter, which must be a pointer.
// If C is an array type, invokes 'delete[]' on the parameter; otherwise,
// invokes 'delete'. The default deleter for unique_ptr<T>.
@@ -244,7 +238,7 @@ class unique_ptr : public internal::unique_ptr_base<C, D> {
// Move constructor.
unique_ptr(unique_ptr&& that)
- : internal::unique_ptr_base<C, D>(nonstd::move(that)) {}
+ : internal::unique_ptr_base<C, D>(std::move(that)) {}
// operator=. Allows assignment from a nullptr. Deletes the currently owned
// object, if any.
@@ -317,7 +311,7 @@ class unique_ptr<C[], D> : public internal::unique_ptr_base<C, D> {
// Move constructor.
unique_ptr(unique_ptr&& that)
- : internal::unique_ptr_base<C, D>(nonstd::move(that)) {}
+ : internal::unique_ptr_base<C, D>(std::move(that)) {}
// operator=. Allows assignment from a nullptr. Deletes the currently owned
// array, if any.