Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 1be0e9c

Browse files
Geod24thewilsonator
authored andcommitted
GC's PoolTable: Add an opSlice overload for the whole table
1 parent 1f0375e commit 1be0e9c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/core/internal/gc/pooltable.d

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ struct PoolTable(Pool)
6969
return pools[a .. b];
7070
}
7171

72+
/// Returns: A slice over all pools in this `PoolTable`
73+
inout(Pool*)[] opSlice() inout return @trusted pure nothrow @nogc
74+
{
75+
return this.pools[0 .. this.length];
76+
}
77+
7278
alias opDollar = length;
7379

7480
/**

0 commit comments

Comments
 (0)