feat(operator): add operator_index_get/set to Array and Slice with generic monomorphization
This commit is contained in:
@@ -28,4 +28,12 @@ func Slice_Len<T>(self: *Slice<T>) -> uint {
|
||||
return self.len;
|
||||
}
|
||||
|
||||
func Slice_operator_index_get<T>(self: *Slice<T>, idx: uint) -> T {
|
||||
return Slice_Get<T>(self, idx);
|
||||
}
|
||||
|
||||
func Slice_operator_index_set<T>(self: *Slice<T>, idx: uint, value: T) {
|
||||
Slice_Set<T>(self, idx, value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user