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

Unified Diff: mojo/public/cpp/bindings/lib/template_util.h

Issue 2038273002: Remove base/move.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/cpp/bindings/lib/filter_chain.h ('k') | mojo/public/cpp/bindings/map.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..bcd88b3adf18dd7c9e69d3ef0f480167cf78e6db 100644
--- a/mojo/public/cpp/bindings/lib/template_util.h
+++ b/mojo/public/cpp/bindings/lib/template_util.h
@@ -7,6 +7,8 @@
#include <type_traits>
+#include "base/template_util.h"
+
namespace mojo {
namespace internal {
@@ -52,14 +54,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 =base::is_move_assignable<T>::value &&
Nico 2016/06/06 18:21:53 i suppose this is clang-format getting this wrong?
dcheng 2016/06/06 18:26:42 Oops, this is me forgetting to upload the clang fo
+ !base::is_copy_assignable<T>::value;
};
// This goop is a trick used to implement a template that can be used to
« no previous file with comments | « mojo/public/cpp/bindings/lib/filter_chain.h ('k') | mojo/public/cpp/bindings/map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698