How to test if a string is pointing into read-only memory?

Paul Backus snarwin at gmail.com
Tue Oct 12 22:58:40 UTC 2021


On Tuesday, 12 October 2021 at 21:42:45 UTC, IGotD- wrote:
> On Tuesday, 12 October 2021 at 09:20:42 UTC, Elronnd wrote:
>>
>> There is no good way.
>
> Can't it be done using function overloading?

Function overloading lets you distinguish between arguments with 
different types, but strings in read-only memory and strings in 
read-write memory both have the same type: string.


More information about the Digitalmars-d-learn mailing list