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

Side by Side Diff: base/template_util.h

Issue 1475233002: Remove base::enable_if (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
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 <cstddef> // For size_t.
9 9
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 sizeof(internal::YesType)> { 110 sizeof(internal::YesType)> {
111 }; 111 };
112 112
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 template<bool B, class T = void>
121 struct enable_if {};
122
123 template<class T>
124 struct enable_if<true, T> { typedef T type; };
125
126 } // namespace base 120 } // namespace base
127 121
128 #endif // BASE_TEMPLATE_UTIL_H_ 122 #endif // BASE_TEMPLATE_UTIL_H_
OLDNEW
« no previous file with comments | « base/numerics/safe_numerics_unittest.cc ('k') | chrome/browser/sync_file_system/drive_backend/callback_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698