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

Unified Diff: Source/wtf/OwnPtrCommon.h

Issue 23531003: Type check when upcasting PassOwnPtr/PassOwnArrayPtr to avoid possible function call ambiguousness (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 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/OwnPtrCommon.h
diff --git a/Source/wtf/OwnPtrCommon.h b/Source/wtf/OwnPtrCommon.h
index 6aada1f80a0e087531aa6db185f29d6f9d68fb8d..89932d8e0319cad774a3cfa5292c30fd9c5df2ba 100644
--- a/Source/wtf/OwnPtrCommon.h
+++ b/Source/wtf/OwnPtrCommon.h
@@ -28,6 +28,11 @@
#ifndef WTF_OwnPtrCommon_h
#define WTF_OwnPtrCommon_h
+#define EnsureOwnPtrConvertibleArgDefn \
+ typename EnableIf<IsPointerConvertible<typename PassOwnPtr<U>::ValueType, ValueType>::Value, bool>::Type
+#define EnsureOwnPtrConvertibleArgDecl \
+ EnsureOwnPtrConvertibleArgDefn = true
+
#if OS(WINDOWS)
typedef struct HBITMAP__* HBITMAP;
typedef struct HBRUSH__* HBRUSH;
« no previous file with comments | « Source/wtf/OwnPtr.h ('k') | Source/wtf/PassOwnArrayPtr.h » ('j') | Source/wtf/PassRefPtr.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698