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 58356dccb061c272783d689635273018b4e42b17..34011cf4b90b10068b6ceb6f723c5c9ed0ba77bd 100644 |
--- a/mojo/public/cpp/bindings/lib/template_util.h |
+++ b/mojo/public/cpp/bindings/lib/template_util.h |
@@ -6,8 +6,6 @@ |
#define MOJO_PUBLIC_CPP_BINDINGS_LIB_TEMPLATE_UTIL_H_ |
#include <type_traits> |
- |
-#include "base/template_util.h" |
namespace mojo { |
namespace internal { |
@@ -54,8 +52,14 @@ |
// destructive way. |
template <typename T> |
struct IsMoveOnlyType { |
+ template <typename U> |
+ static YesType Test(const typename U::MoveOnlyTypeForCPP03*); |
+ |
+ template <typename U> |
+ static NoType Test(...); |
+ |
static const bool value = |
- base::is_move_assignable<T>::value && !base::is_copy_assignable<T>::value; |
+ sizeof(Test<T>(0)) == sizeof(YesType) && !IsConst<T>::value; |
}; |
// This goop is a trick used to implement a template that can be used to |