Is this a correct way to make this code working at compile time?

Andrey Zherikov andrey.zherikov at gmail.com
Tue Nov 19 16:32:22 UTC 2024


On Tuesday, 19 November 2024 at 00:27:51 UTC, Dom DiSc wrote:
> On Monday, 18 November 2024 at 21:59:43 UTC, Andrey Zherikov 
> wrote:
>> Is this a correct/safe way to go since I'm copying `const 
>> string[]` to `string[]`?
>
> Copying constants to variables is something absolutely normal. 
> If this wouldn't work, how would you program at all?
> So, yes this is safe and correct.
> What you should NOT do is casting const away (without copying).

Thank you!


More information about the Digitalmars-d-learn mailing list