e.g.: ```cs // -------------------vvvvvvvv-- returns a ref struct if (glfwGetError(error.AsP
e.g.:
// -------------------vvvvvvvv-- returns a ref struct
if (glfwGetError(error.AsPtr2D()) == 0 || error == nullptr)
{
throw new Exception("failed to create window and failed to get error");
}private readonly ref byte InteriorRef; and then that works?Inner (or whatever it's called) and return another PtrType<T>.SomeT**?ConstPtr<sbyte> in this instancePtr you implicitly cast from a something*, it will be equivalent to fully unsafeConstPtr<sbyte> incorrectly returns ConstPtr2D<sbyte> atmref this ConstPtr<sbyte> to a ConstPtr2D<sbyte>ldarg.0 ret)
Ptr<T> stuff may be a bit hard to understand, certainly i'm looking at this and wondering what exactly this is supposed to meanPtr<T> struct that may leave (especially to beginners) some users scratching their headsint glfwGetError(const char**) (i.e. sbyte**) look like, how would the user use it, and what does the AsPtr2D (or whatever) have to do to make it workint glfwError(ConstPtrType<Ptr<sbyte>>)ref PtrType<sbyte> into PtrType<Ptr<sbyte>> (so I guess it should be AsConstPtr2D()) and the given ref is just stored as-is and the "the inner is also a ptr" is just tracked by the compiler via genericsRefMut<sbyte> type at runtime? It's just a ref byte on the inside (or a readonly ref byte in this case, but same same)PtrType<sbyte> a = ???;
PtrType<Ptr<sbyte>> b = a.PtrTo();
glfwGetError(b);PtrType<sbyte> a = nullptr;
PtrType<Ptr<sbyte> b = a.PtrTo();
glfwGetError(b);
Debug.Assert(a != nullptr);private readonly ref byte InteriorRef;InnerPtrType<T>SomeT**ConstPtr<sbyte>ConstPtr<sbyte>something*ConstPtr2D<sbyte>ConstPtr2D<sbyte>ref this ConstPtr<sbyte>ldarg.0retint glfwGetError(const char**)sbyte**