summaryrefslogblamecommitdiff
path: root/www-client/chromium/files/chromium-96-template-friend.patch
blob: 4b8a5e40bf721fc7998a221b7f7587a1e3c25890 (plain) (tree)

































                                                                              
diff --git a/base/memory/safe_ref.h b/base/memory/safe_ref.h
index 7189f8786..162c6744f 100644
--- a/base/memory/safe_ref.h
+++ b/base/memory/safe_ref.h
@@ -88,9 +88,10 @@ class SafeRef {
  private:
   template <typename U>
   friend class SafeRef;
-  friend SafeRef internal::MakeSafeRefFromWeakPtrInternals(
+  template <typename U>
+  friend SafeRef<U> internal::MakeSafeRefFromWeakPtrInternals(
       const internal::WeakReference& ref,
-      T* ptr);
+      U* ptr);
 
   // Construction from a from WeakPtr. Will CHECK() if the WeakPtr is already
   // invalid.
diff --git a/base/memory/weak_ptr.h b/base/memory/weak_ptr.h
index 17f7b8f87..d042ecff2 100644
--- a/base/memory/weak_ptr.h
+++ b/base/memory/weak_ptr.h
@@ -289,9 +289,10 @@ class WeakPtr : public internal::WeakPtrBase {
   template <typename U> friend class WeakPtr;
   friend class SupportsWeakPtr<T>;
   friend class WeakPtrFactory<T>;
-  friend SafeRef<T> internal::MakeSafeRefFromWeakPtrInternals(
+  template <typename U>
+  friend SafeRef<U> internal::MakeSafeRefFromWeakPtrInternals(
       const internal::WeakReference& ref,
-      T* ptr);
+      U* ptr);
 
   WeakPtr(const internal::WeakReference& ref, T* ptr)
       : WeakPtrBase(ref, reinterpret_cast<uintptr_t>(ptr)) {}