Why D const is annoying

Walter Bright newshound2 at digitalmars.com
Sun Dec 11 10:00:24 PST 2011


On 12/11/2011 9:07 AM, Mafi wrote:
> But what about:
> void f(ref inout(int)* a, inout(int)* b) { a = b; }
> This cant work with const because that would violate the const system. I think
> the rule should be that either the return type must be inout or at least one
> ref/out parameter.
> Am I overlooking something?

It should work with const.


More information about the Digitalmars-d mailing list