Returning variable-sized stack data

monkyyy crazymonkyyy at gmail.com
Mon Jul 15 17:20:57 UTC 2024


On Monday, 15 July 2024 at 11:12:59 UTC, ryuukk_ wrote:
> ubyte[$]

this one

----

I think you should also preemptively handle runtime stack 
allocated arrays inside the function

```d
int[$] foo(size_t i){
   int[i] output;
   foreach(...){
     ...
   }
   return output;
}
```


More information about the dip.ideas mailing list