Inout table

Steven Schveighoffer via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Sep 13 16:20:27 PDT 2017


On 9/13/17 3:04 PM, nkm1 wrote:

> Thank you. Now it is clear to me. The source of my confusion was that, 
> say, given a function:
> inout(int*) foo(inout(int*) p)
> as per table, combining (mutable) argument int* m with parameter 
> inout(int*) p would produce parameter type const(int*). But now I see 
> that the table deduces the common type of all parameters, not the common 
> type of a parameter and its argument (the documentation is kind of hard 
> to parse: "If such a match occurs, the inout is considered the common 
> qualifier of the matched qualifiers...").

Yeah, I should update that table and inout explanation...

-Steve


More information about the Digitalmars-d-learn mailing list