OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_CLONE_EQUALS_UTIL_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_CLONE_EQUALS_UTIL_H_ |
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_CLONE_EQUALS_UTIL_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_CLONE_EQUALS_UTIL_H_ |
7 | 7 |
8 #include <memory> | |
8 #include <type_traits> | 9 #include <type_traits> |
9 #include <unordered_map> | 10 #include <unordered_map> |
10 #include <vector> | 11 #include <vector> |
11 | 12 |
13 #include "base/memory/ptr_util.h" | |
12 #include "base/optional.h" | 14 #include "base/optional.h" |
15 #include "base/values.h" | |
yzshen1
2017/02/16 17:23:16
Is it really necessary to include base/values.h (a
chfremer
2017/02/16 18:15:49
Sorry, I forgot to remove those.
Done.
| |
13 #include "mojo/public/cpp/bindings/lib/template_util.h" | 16 #include "mojo/public/cpp/bindings/lib/template_util.h" |
14 | 17 |
15 namespace mojo { | 18 namespace mojo { |
16 namespace internal { | 19 namespace internal { |
17 | 20 |
18 template <typename T> | 21 template <typename T> |
19 struct HasCloneMethod { | 22 struct HasCloneMethod { |
20 template <typename U> | 23 template <typename U> |
21 static char Test(decltype(&U::Clone)); | 24 static char Test(decltype(&U::Clone)); |
22 template <typename U> | 25 template <typename U> |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
152 | 155 |
153 template <typename T> | 156 template <typename T> |
154 bool Equals(const T& a, const T& b) { | 157 bool Equals(const T& a, const T& b) { |
155 return EqualsTraits<T>::Equals(a, b); | 158 return EqualsTraits<T>::Equals(a, b); |
156 } | 159 } |
157 | 160 |
158 } // namespace internal | 161 } // namespace internal |
159 } // namespace mojo | 162 } // namespace mojo |
160 | 163 |
161 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_CLONE_EQUALS_UTIL_H_ | 164 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_CLONE_EQUALS_UTIL_H_ |
OLD | NEW |