summaryrefslogtreecommitdiff
path: root/xpcom
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2023-10-18 14:35:59 +0200
committerMoonchild <moonchild@palemoon.org>2023-11-05 13:16:39 +0100
commitc87116b33267a8df388ca3652d211b7f8254a98d (patch)
tree8823d7815df612885a5769d6ede196b261041779 /xpcom
parente29ae4e08ccce7f120f8ee88dd238bd2b4facbf4 (diff)
downloaduxp-c87116b33267a8df388ca3652d211b7f8254a98d.tar.gz
Issue #2281 - Add some deduction guides for class template arguments.
This is necessary if we want to start using Span() constructors instead of the MakeSpan() kludge.
Diffstat (limited to 'xpcom')
-rw-r--r--xpcom/glue/nsTArray.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/xpcom/glue/nsTArray.h b/xpcom/glue/nsTArray.h
index 03913a3765..47635de318 100644
--- a/xpcom/glue/nsTArray.h
+++ b/xpcom/glue/nsTArray.h
@@ -2466,6 +2466,12 @@ MakeSpan(const nsTArray_Impl<ElementType, TArrayAlloc>& aTArray)
return aTArray;
}
+template <typename E, class Alloc>
+Span(nsTArray_Impl<E, Alloc>&) -> Span<E>;
+
+template <typename E, class Alloc>
+Span(const nsTArray_Impl<E, Alloc>&) -> Span<const E>;
+
} // namespace mozilla
// Assert that AutoTArray doesn't have any extra padding inside.