| OLD | NEW |
| 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 Loading... |
| 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_ |
| OLD | NEW |