| Index: mojo/public/cpp/bindings/lib/template_util.h
|
| diff --git a/mojo/public/cpp/bindings/lib/template_util.h b/mojo/public/cpp/bindings/lib/template_util.h
|
| index 4e4ce66b6f4b2b2d34448781bc3bdc0eb6e84736..5151123ac0b149d90f8bc87e14abe653dab70d89 100644
|
| --- a/mojo/public/cpp/bindings/lib/template_util.h
|
| +++ b/mojo/public/cpp/bindings/lib/template_util.h
|
| @@ -114,54 +114,6 @@ struct Conditional<false, T, F> {
|
| typedef F type;
|
| };
|
|
|
| -template <typename T>
|
| -struct HasCloneMethod {
|
| - template <typename U>
|
| - static char Test(decltype(&U::Clone));
|
| - template <typename U>
|
| - static int Test(...);
|
| - static const bool value = sizeof(Test<T>(0)) == sizeof(char);
|
| -
|
| - private:
|
| - EnsureTypeIsComplete<T> check_t_;
|
| -};
|
| -
|
| -template <typename T,
|
| - typename std::enable_if<HasCloneMethod<T>::value>::type* = nullptr>
|
| -T Clone(const T& input) {
|
| - return input.Clone();
|
| -};
|
| -
|
| -template <typename T,
|
| - typename std::enable_if<!HasCloneMethod<T>::value>::type* = nullptr>
|
| -T Clone(const T& input) {
|
| - return input;
|
| -}
|
| -
|
| -template <typename T>
|
| -struct HasEqualsMethod {
|
| - template <typename U>
|
| - static char Test(decltype(&U::Equals));
|
| - template <typename U>
|
| - static int Test(...);
|
| - static const bool value = sizeof(Test<T>(0)) == sizeof(char);
|
| -
|
| - private:
|
| - EnsureTypeIsComplete<T> check_t_;
|
| -};
|
| -
|
| -template <typename T,
|
| - typename std::enable_if<HasEqualsMethod<T>::value>::type* = nullptr>
|
| -bool Equals(const T& a, const T& b) {
|
| - return a.Equals(b);
|
| -};
|
| -
|
| -template <typename T,
|
| - typename std::enable_if<!HasEqualsMethod<T>::value>::type* = nullptr>
|
| -bool Equals(const T& a, const T& b) {
|
| - return a == b;
|
| -}
|
| -
|
| } // namespace internal
|
| } // namespace mojo
|
|
|
|
|