Re: about const ref

2020-02-11 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Tuesday, 11 February 2020 at 09:20:11 UTC, Mathias Lang wrote: On Tuesday, 11 February 2020 at 07:51:04 UTC, Ferhat Kurtulmuş wrote: You're correct for 'a' and 'b'. However `in` only entails `const`, so it is not an exact replacement. Additionally, you might want to add `scope` to show that

Re: about const ref

2020-02-11 Thread Mathias Lang via Digitalmars-d-learn
On Tuesday, 11 February 2020 at 07:51:04 UTC, Ferhat Kurtulmuş wrote: I need to be sure about "const ref". Based on the following function, does it mean: Type can be string or an integral type. (a) k1 is not copied on function calls (b) k1 cannot be modified inside function Please

about const ref

2020-02-10 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
I need to be sure about "const ref". Based on the following function, does it mean: Type can be string or an integral type. (a) k1 is not copied on function calls (b) k1 cannot be modified inside function Please correct me if I am wrong. Can storage class "in" be used t