OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 MOJO_PUBLIC_CPP_BINDINGS_LIB_TEMPLATE_UTIL_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_TEMPLATE_UTIL_H_ |
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_TEMPLATE_UTIL_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_TEMPLATE_UTIL_H_ |
7 | 7 |
8 namespace mojo { | 8 namespace mojo { |
9 namespace internal { | 9 namespace internal { |
10 | 10 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 !IsSame<Base const, void const>::value; | 97 !IsSame<Base const, void const>::value; |
98 }; | 98 }; |
99 | 99 |
100 template <class T> | 100 template <class T> |
101 struct RemovePointer {}; | 101 struct RemovePointer {}; |
102 template <class T> | 102 template <class T> |
103 struct RemovePointer<T*> { | 103 struct RemovePointer<T*> { |
104 typedef T type; | 104 typedef T type; |
105 }; | 105 }; |
106 | 106 |
| 107 template <template <typename...> class Template, typename T> |
| 108 struct IsSpecializationOf : FalseType {}; |
| 109 |
| 110 template <template <typename...> class Template, typename... Args> |
| 111 struct IsSpecializationOf<Template, Template<Args...>> : TrueType {}; |
| 112 |
| 113 template <class A, class B> |
| 114 struct LogicalOr : IntegralConstant<bool, A::value || B::value> {}; |
| 115 |
107 } // namespace internal | 116 } // namespace internal |
108 } // namespace mojo | 117 } // namespace mojo |
109 | 118 |
110 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_TEMPLATE_UTIL_H_ | 119 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_TEMPLATE_UTIL_H_ |
OLD | NEW |