malloc(s)[0..s] vs cast(T)malloc(s)

Ali Çehreli acehreli at
Thu Oct 15 01:22:54 UTC 2020

On 10/14/20 1:15 PM, Jack wrote:

 >> auto x = malloc(s)[0..s];


Note that 'x' is passed to emplace() at that link and emplace() requires 
a slice. That's why the a slice is made from the pointer returned by 


More information about the Digitalmars-d-learn mailing list