I suggest changing the function to not take a raw pointer.
The whole T vs VertexType thing was also confusing to me, it took me a while to figure out how to use the function. I'd prefer simply passing the size myself rather than it using size_of::\<T>().
What I tried doing (and got a segfault with):
What you actually need to do:
I suggest changing the function to not take a raw pointer.
The whole T vs VertexType thing was also confusing to me, it took me a while to figure out how to use the function. I'd prefer simply passing the size myself rather than it using size_of::\<T>().