On Tue, 08 Nov 2011 03:16:30 -0500, Timon Gehr <[email protected]> wrote:

On 11/08/2011 02:08 AM, Walter Bright wrote:
http://drdobbs.com/blogs/cpp/231902461

Anyone want to do the reddit honors?

Nice article!


> It isn't a template, and inout can only be used on function parameters and the return value.

What about local variables?

Yes. Local variables cease to exist beyond the scope of the function, so they are allowed. the main principal of inout is that it only exists as inout during the scope of the function, then goes back to its original const flavor (const/immutable/mutable). In fact, my original proposal called inout "scoped const".

-Steve

Reply via email to