Comment by codr7
16 hours ago
Nice, when you know the length at compile time, which is rarely from my experience.
The holy grail is runtime access to the length, which means an array would have to be backed by something more elaborate.
16 hours ago
Nice, when you know the length at compile time, which is rarely from my experience.
The holy grail is runtime access to the length, which means an array would have to be backed by something more elaborate.
Oh, it also work for runtime length:
https://godbolt.org/z/PnaWWcK9o
Now try that on a compiler without -fsanitize=bounds, yet full ISO C compliant.
You can still access the size which is what the parent was asking for. And please tell me how you would try this on an ISO compliant compiler for D.