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

Side by Side Diff: include/private/SkTLogic.h

Issue 1555153002: Add skstd::remove_pointer_t and use it. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase. 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/ports/SkFontMgr_android_parser.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 * 6 *
7 * 7 *
8 * This header provides some of the helpers (like std::enable_if_t) which will 8 * This header provides some of the helpers (like std::enable_if_t) which will
9 * become available with C++14 in the type_traits header (in the skstd 9 * become available with C++14 in the type_traits header (in the skstd
10 * namespace). This header also provides several Skia specific additions such 10 * namespace). This header also provides several Skia specific additions such
(...skipping 13 matching lines...) Expand all
24 namespace skstd { 24 namespace skstd {
25 25
26 template <bool B> using bool_constant = std::integral_constant<bool, B>; 26 template <bool B> using bool_constant = std::integral_constant<bool, B>;
27 27
28 template <bool B, typename T, typename F> using conditional_t = typename std::co nditional<B, T, F>::type; 28 template <bool B, typename T, typename F> using conditional_t = typename std::co nditional<B, T, F>::type;
29 template <bool B, typename T = void> using enable_if_t = typename std::enable_if <B, T>::type; 29 template <bool B, typename T = void> using enable_if_t = typename std::enable_if <B, T>::type;
30 30
31 template <typename T> using remove_const_t = typename std::remove_const<T>::type ; 31 template <typename T> using remove_const_t = typename std::remove_const<T>::type ;
32 template <typename T> using remove_volatile_t = typename std::remove_volatile<T> ::type; 32 template <typename T> using remove_volatile_t = typename std::remove_volatile<T> ::type;
33 template <typename T> using remove_cv_t = typename std::remove_cv<T>::type; 33 template <typename T> using remove_cv_t = typename std::remove_cv<T>::type;
34 template <typename T> using remove_pointer_t = typename std::remove_pointer<T>:: type;
34 template <typename T> using remove_reference_t = typename std::remove_reference< T>::type; 35 template <typename T> using remove_reference_t = typename std::remove_reference< T>::type;
35 template <typename T> using remove_extent_t = typename std::remove_extent<T>::ty pe; 36 template <typename T> using remove_extent_t = typename std::remove_extent<T>::ty pe;
36 37
37 template <typename T, typename U> struct is_same : std::false_type {}; 38 template <typename T, typename U> struct is_same : std::false_type {};
38 template <typename T> struct is_same<T, T> : std::true_type {}; 39 template <typename T> struct is_same<T, T> : std::true_type {};
39 40
40 template <typename T> struct is_void : is_same<void, remove_cv_t<T>> {}; 41 template <typename T> struct is_void : is_same<void, remove_cv_t<T>> {};
41 42
42 template <typename T> struct is_const : std::false_type {}; 43 template <typename T> struct is_const : std::false_type {};
43 template <typename T> struct is_const<const T> : std::true_type {}; 44 template <typename T> struct is_const<const T> : std::true_type {};
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 template <typename D, typename S> using same_volatile_t = typename same_volatile <D, S>::type; 180 template <typename D, typename S> using same_volatile_t = typename same_volatile <D, S>::type;
180 template <typename D, typename S> using same_cv = copy_cv<skstd::remove_cv_t<D>, S>; 181 template <typename D, typename S> using same_cv = copy_cv<skstd::remove_cv_t<D>, S>;
181 template <typename D, typename S> using same_cv_t = typename same_cv<D, S>::type ; 182 template <typename D, typename S> using same_cv_t = typename same_cv<D, S>::type ;
182 183
183 } // namespace sknonstd 184 } // namespace sknonstd
184 185
185 // Just a pithier wrapper for enable_if_t. 186 // Just a pithier wrapper for enable_if_t.
186 #define SK_WHEN(condition, T) skstd::enable_if_t<!!(condition), T> 187 #define SK_WHEN(condition, T) skstd::enable_if_t<!!(condition), T>
187 188
188 #endif 189 #endif
OLDNEW
« no previous file with comments | « no previous file | src/ports/SkFontMgr_android_parser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698