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

Side by Side Diff: mojo/public/cpp/bindings/lib/template_util.h

Issue 649633003: Add Equals() to mojom structs and related types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reorder Created 6 years, 2 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 | « mojo/public/cpp/bindings/lib/map_internal.h ('k') | mojo/public/cpp/bindings/map.h » ('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 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
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_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/map_internal.h ('k') | mojo/public/cpp/bindings/map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698