Why do "const inout" and "const inout shared" exist?

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Sun Jul 2 03:31:47 PDT 2017


On 7/2/17 5:15 AM, Walter Bright wrote:
> On 7/1/2017 3:12 PM, Timon Gehr wrote:
>> It used to be the case that const(inout(T)) = const(T),
> 
> Anyone want to run git bisect and see when this changed? This would help 
> in figuring out the rationale.
> 
> Here's the code to test with it:
> 
> inout(const char)* foo(inout(const(char))* p)
> {
>      pragma(msg, typeof(p));
>      static assert(is(typeof(p) == const(char)*));
>      return p;
> }

https://issues.dlang.org/show_bug.cgi?id=6930

-Steve


More information about the Digitalmars-d mailing list