Implement call expressions

This commit is contained in:
gingerBill committed 2023-07-22 09:06:44 +01:00
1 parent b09ea17f0e
commit 4654b41c3e
4 files changed
+201 -6

No files matched your search

+11
View File
@@ -168,6 +168,17 @@ gb_internal gb_inline Slice<T> slice(Slice<T> const &array, isize lo, isize hi)
}
return out;
}
template <typename T>
gb_internal gb_inline Slice<T> slice(Array<T> const &array, isize lo, isize hi) {
GB_ASSERT(0 <= lo && lo <= hi && hi <= array.count);
Slice<T> out = {};
isize len = hi-lo;
if (len > 0) {
out.data = array.data+lo;
out.count = len;
}
return out;
}
template <typename T>