summaryrefslogtreecommitdiff
path: root/third_party/base/nonstd_unique_ptr.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-22 14:57:45 -0800
committerLei Zhang <thestig@chromium.org>2015-12-22 14:57:45 -0800
commit9ba6a147311eacb933c175168de6d11c439985d3 (patch)
treea1a75ac52168294f73b6eda5c65c26e4444b4c47 /third_party/base/nonstd_unique_ptr.h
parentcd2bb30aba89a05c0bbd4d6973fa070205e3a1e8 (diff)
downloadpdfium-9ba6a147311eacb933c175168de6d11c439985d3.tar.xz
Merge to XFA: Start using allowed C++11 features.
TBR=dml@google.com, thakis@chromium.org Review URL: https://codereview.chromium.org/1544923002 . Review URL: https://codereview.chromium.org/1545823002 . (cherry picked from commit ba2586d2c0a50df14aa2549a0a841e1d4b9af4b6) (cherry picked from commit 87f7d29531dabfd66e547a6be31a08272ff631d5) Review URL: https://codereview.chromium.org/1542213002 .
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.