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/SkTLazy.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/SkTLazy.h')
-rw-r--r-- | include/core/SkTLazy.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/core/SkTLazy.h b/include/core/SkTLazy.h index 60d816147f..c8ae3178f7 100644 --- a/include/core/SkTLazy.h +++ b/include/core/SkTLazy.h @@ -11,6 +11,7 @@ #include "../private/SkTemplates.h" #include "SkTypes.h" #include <new> +#include <utility> /** * Efficient way to defer allocating/initializing a class until it is needed @@ -50,7 +51,7 @@ public: if (this->isValid()) { fPtr->~T(); } - fPtr = new (SkTCast<T*>(fStorage.get())) T(skstd::forward<Args>(args)...); + fPtr = new (SkTCast<T*>(fStorage.get())) T(std::forward<Args>(args)...); return fPtr; } |