Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(629)

Unified Diff: src/utils/SkTFitsIn.h

Issue 1561683002: Start using <type_traits> and <utility> (C++11). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix skstd::unique_ptr::compressed_pair. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pdf/SkPDFMetadata.cpp ('k') | tests/CPlusPlusEleven.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkTFitsIn.h
diff --git a/src/utils/SkTFitsIn.h b/src/utils/SkTFitsIn.h
index cf92822d8fe7fd8a022964f3333799efd9c3f065..fc2b8dd6307acc6518e53d1007b8fd0e247b8868 100644
--- a/src/utils/SkTFitsIn.h
+++ b/src/utils/SkTFitsIn.h
@@ -11,6 +11,7 @@
#include "SkTypes.h"
#include "SkTLogic.h"
#include <limits>
+#include <type_traits>
namespace sktfitsin {
namespace Private {
@@ -31,7 +32,7 @@ template<typename A, typename B> struct SkTHasMoreDigits
* that source values are in the range of the Destination.
*/
template <typename S> struct SkTOutOfRange_False {
- typedef skstd::false_type can_be_true;
+ typedef std::false_type can_be_true;
typedef S source_type;
static bool apply(S s) {
return false;
@@ -42,7 +43,7 @@ template <typename S> struct SkTOutOfRange_False {
* Assumes that Min(S) <= Min(D).
*/
template <typename D, typename S> struct SkTOutOfRange_LT_MinD {
- typedef skstd::true_type can_be_true;
+ typedef std::true_type can_be_true;
typedef S source_type;
static bool apply(S s) {
typedef SkTHasMoreDigits<S, D> precondition;
@@ -54,7 +55,7 @@ template <typename D, typename S> struct SkTOutOfRange_LT_MinD {
/** A low side predicate which tests if the source value is less than 0. */
template <typename D, typename S> struct SkTOutOfRange_LT_Zero {
- typedef skstd::true_type can_be_true;
+ typedef std::true_type can_be_true;
typedef S source_type;
static bool apply(S s) {
return s < static_cast<S>(0);
@@ -65,7 +66,7 @@ template <typename D, typename S> struct SkTOutOfRange_LT_Zero {
* Assumes that Max(S) >= Max(D).
*/
template <typename D, typename S> struct SkTOutOfRange_GT_MaxD {
- typedef skstd::true_type can_be_true;
+ typedef std::true_type can_be_true;
typedef S source_type;
static bool apply(S s) {
typedef SkTHasMoreDigits<S, D> precondition;
@@ -79,7 +80,7 @@ template <typename D, typename S> struct SkTOutOfRange_GT_MaxD {
* First checks OutOfRange_Low then, if in range, OutOfRange_High.
*/
template<class OutOfRange_Low, class OutOfRange_High> struct SkTOutOfRange_Either {
- typedef skstd::true_type can_be_true;
+ typedef std::true_type can_be_true;
typedef typename OutOfRange_Low::source_type source_type;
static bool apply(source_type s) {
bool outOfRange = OutOfRange_Low::apply(s);
« no previous file with comments | « src/pdf/SkPDFMetadata.cpp ('k') | tests/CPlusPlusEleven.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698