passing a parrameter read-only ref?

Paul Backus snarwin at
Sun Sep 13 15:21:37 UTC 2020

On Sunday, 13 September 2020 at 13:35:15 UTC, Martin wrote:
> Hi,
> i would like to create a function which takes the first 
> parameter as a reference to a struct - but assure the calle 
> that the reference is read-only. Can this be done?

Yes, you can do this with `ref const`.

More information about the Digitalmars-d-learn mailing list