diff options
author | 2016-01-05 14:59:40 -0800 | |
---|---|---|
committer | 2016-01-05 14:59:40 -0800 | |
commit | 221524de3be1fc343ad328c5e99562f32b5cad9c (patch) | |
tree | d9b791db0ff48921388d2b7443fd5fc58f0b9583 /include/core/SkTArray.h | |
parent | 3c1468188924ede1e6589cddee84031c16782226 (diff) |
Start using <type_traits> and <utility> (C++11).
SkUtility.h and SkTLogic.h implement a number of type traits now
available through <type_traits> and <utility>. This removes SkUtility.h,
replacing it with <utility>, and moves a number of traits in
SkTLogic.h to use the std:: equivelents. This change only uses C++11
parts of the standard library; SkTLogic.h will continue to provide
C++14 and beyond for now in the skstd namespace.
The changes to SkTLogic.h are being done gradually so that safe changes
may be landed confidently, with more risky changes in the future.
Review URL: https://codereview.chromium.org/1561683002
Diffstat (limited to 'include/core/SkTArray.h')
-rw-r--r-- | include/core/SkTArray.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/core/SkTArray.h b/include/core/SkTArray.h index 9f1bfa1ac1..17cbc5c05c 100644 --- a/include/core/SkTArray.h +++ b/include/core/SkTArray.h @@ -12,6 +12,7 @@ #include "SkTypes.h" #include <new> +#include <utility> template <typename T, bool MEM_COPY = false> class SkTArray; @@ -198,7 +199,7 @@ public: */ template<class... Args> T& emplace_back(Args&&... args) { T* newT = reinterpret_cast<T*>(this->push_back_raw(1)); - return *new (newT) T(skstd::forward<Args>(args)...); + return *new (newT) T(std::forward<Args>(args)...); } /** |