LibGC: Add some deduction guides for GC::RootVector

This makes is easy to construct a RootVector from a vector or span of
references to GC objects.
This commit is contained in:
Andreas Kling 2025-05-28 22:39:35 +02:00 committed by Alexander Kalenik
commit d5892c7c7a
Notes: github-actions[bot] 2025-05-29 01:48:43 +00:00

View file

@ -96,4 +96,13 @@ public:
}
};
template<typename T>
RootVector(Heap&, ReadonlySpan<T> const&) -> RootVector<T>;
template<typename T>
RootVector(Heap&, Span<T> const&) -> RootVector<T>;
template<typename T>
RootVector(Heap&, Vector<T> const&) -> RootVector<T>;
}