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

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

Issue 883843002: Update mojo sdk to rev 126532ce21c5c3c55a1e1693731411cb60169efd (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to review Created 5 years, 11 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
Index: third_party/mojo/src/mojo/public/cpp/bindings/lib/template_util.h
diff --git a/third_party/mojo/src/mojo/public/cpp/bindings/lib/template_util.h b/third_party/mojo/src/mojo/public/cpp/bindings/lib/template_util.h
index c221a545337d7a7c073a9d49857198d1ef2a0a2d..2edbf5c532e542329917824fcb714e106b1323b0 100644
--- a/third_party/mojo/src/mojo/public/cpp/bindings/lib/template_util.h
+++ b/third_party/mojo/src/mojo/public/cpp/bindings/lib/template_util.h
@@ -60,11 +60,13 @@ struct IsMoveOnlyType {
sizeof(Test<T>(0)) == sizeof(YesType) && !IsConst<T>::value;
};
+// Returns a reference to |t| when T is not a move-only type.
template <typename T>
typename EnableIf<!IsMoveOnlyType<T>::value, T>::type& Forward(T& t) {
return t;
}
+// Returns the result of t.Pass() when T is a move-only type.
template <typename T>
typename EnableIf<IsMoveOnlyType<T>::value, T>::type Forward(T& t) {
return t.Pass();
« no previous file with comments | « third_party/mojo/src/mojo/public/cpp/bindings/lib/map_internal.h ('k') | third_party/mojo/src/mojo/public/cpp/bindings/map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698