can implement it on the inside with ```cs public static class PtrAccessor { public static PtrT
can implement it on the inside with
public static class PtrAccessor
{
public static PtrType<T2> Get<T2, T>(this PtrType<T> self, int i)
where T: IPtrMarker<T2>
{
// IDK take an index and do magic with the inner of PtrType
throw null;
}
public static PtrType<T3> Get<T3, T2, T>(this PtrType<T> self, int i, int j)
where T: IPtrMarker<T2>
where T2: IPtrMarker<T3>
{
return self.Get(i).Get(j);
}
}PtrType/Ptr and also ConstPtrType/ConstPtrAsPtr method on the thing you want to take a ref to"), the SDP requires docs and unless we want to ignore our approved proposals we are not allowed to ship without docs.Quoted by kaijellinghaus#0000
Ptr<T> type instead of an array, I would be very confusedPtr<T> causes more problems than it solvesQuoted by kaijellinghaus#0000
PtrTypePtrConstPtrTypeConstPtrAsPtr// However, there are some caveats to this:
// - We use local functions in addition to the generic typeof(T) == typeof(whatever) pattern to work around some
// unfortunate inlining issues in platforms older that .NET 5, where the inliner was going over budget despite
// aggressively inlined functions supposedly being exempt from budgeting.
// See also: https://github.com/dotnet/runtime/issues/38106Ptr<T>Ptr<T>void glDoStuff<T>(T[] myArray) where T : unmanaged {
fixed (void* arrPtr = myArray)
glDoStuff((nuint) myArray.Length, arrPtr);
}