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 34011cf4b90b10068b6ceb6f723c5c9ed0ba77bd..4e4ce66b6f4b2b2d34448781bc3bdc0eb6e84736 100644 |
--- a/mojo/public/cpp/bindings/lib/template_util.h |
+++ b/mojo/public/cpp/bindings/lib/template_util.h |
@@ -52,14 +52,8 @@ struct NoType { |
// 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 = |
- sizeof(Test<T>(0)) == sizeof(YesType) && !IsConst<T>::value; |
+ static const bool value = std::is_constructible<T, T&&>::value && |
+ !std::is_constructible<T, const T&>::value; |
}; |
// This goop is a trick used to implement a template that can be used to |