Mike Parker:

I was  expecting the length field to get in the way, but it
didn't seem to.

If you pass a fixed-sized array by ref it only passes the pointer. The length is not passed, it's a compile-time known value.


My question is, can I rely on this? Is there a guarantee that a ref static array parameter will be compatible with a C array pointer on every platform and architecture?

While the semantics of "ref" if fixed, I don't remember if the standard D ABI specifies how "fixed-sized array by ref" is implemented.

Bye,
bearophile

Reply via email to