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

Unified Diff: Source/wtf/Utility.h

Issue 1129793005: Replace OwnPtr with WTF::Optional for optional recorders. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: merge with master Created 5 years, 7 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: Source/wtf/Utility.h
diff --git a/Source/wtf/Utility.h b/Source/wtf/Utility.h
new file mode 100644
index 0000000000000000000000000000000000000000..c20b9f11832d377ca1258b0747d8dc392fbd6f7a
--- /dev/null
+++ b/Source/wtf/Utility.h
@@ -0,0 +1,23 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef Utility_h
+#define Utility_h
+
+#include "wtf/TypeTraits.h"
+
+namespace WTF {
+
+// TODO(jbroman): When a C++11 standard library is available, replace this with
+// std::forward from <utility>.
+
+template <typename T>
+T&& forward(typename RemoveReference<T>::Type& t) { return static_cast<T&&>(t); }
+
+template <typename T>
+T&& forward(typename RemoveReference<T>::Type&& t) { return static_cast<T&&>(t); }
+
+} // namespace WTF
+
+#endif // Utility_h
« Source/wtf/Optional.h ('K') | « Source/wtf/TypeTraits.cpp ('k') | Source/wtf/wtf.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698