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

Side by Side Diff: base/template_util.h

Issue 1538743002: Switch to standard integer types in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DEPS roll too Created 4 years, 12 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 | « base/task_runner.h ('k') | base/template_util_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_TEMPLATE_UTIL_H_ 5 #ifndef BASE_TEMPLATE_UTIL_H_
6 #define BASE_TEMPLATE_UTIL_H_ 6 #define BASE_TEMPLATE_UTIL_H_
7 7
8 #include <cstddef> // For size_t. 8 #include <stddef.h>
9 9
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 11
12 namespace base { 12 namespace base {
13 13
14 // template definitions from tr1 14 // template definitions from tr1
15 15
16 template<class T, T v> 16 template<class T, T v>
17 struct integral_constant { 17 struct integral_constant {
18 static const T value = v; 18 static const T value = v;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 template <typename T> 113 template <typename T>
114 struct is_class 114 struct is_class
115 : integral_constant<bool, 115 : integral_constant<bool,
116 sizeof(internal::IsClassHelper::Test<T>(0)) == 116 sizeof(internal::IsClassHelper::Test<T>(0)) ==
117 sizeof(internal::YesType)> { 117 sizeof(internal::YesType)> {
118 }; 118 };
119 119
120 } // namespace base 120 } // namespace base
121 121
122 #endif // BASE_TEMPLATE_UTIL_H_ 122 #endif // BASE_TEMPLATE_UTIL_H_
OLDNEW
« no previous file with comments | « base/task_runner.h ('k') | base/template_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698