On Tuesday, 24 May 2016 at 19:52:17 UTC, Era Scarecrow wrote:
You can do that??? I thought slices weren't allowed on raw pointers. You just blew my mind away!
Slicing and indexing are both allowed (actually, that's a way to disable bounds checking on an individual expression, see tip: http://arsdnet.net/this-week-in-d/dec-06.html ) on pointers, though it isn't considered @safe.
Be careful though: it is still manually managed, so if you pass it to some function that keeps a slice to your slice, you open yourself up to a use-after-free bug!