Why do "const inout" and "const inout shared" exist?
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Sun Jul 2 02:15:45 PDT 2017
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;
}
More information about the Digitalmars-d
mailing list