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
parent e0e09f71be
commit d5892c7c7a

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>;
}