inout and function/delegate parameters

Steven Schveighoffer schveiguy at yahoo.com
Fri Mar 9 06:36:44 PST 2012


On Thu, 08 Mar 2012 17:43:34 -0500, Stewart Gordon <smjg_1998 at yahoo.com>  
wrote:

> On 08/03/2012 19:38, Steven Schveighoffer wrote:
> <snip>
>> Yes, I couldn't really find that. It does specifically say casting away  
>> const and then
>> modifying is invalid, but it does not say anything about "if you know  
>> the underlying data
>> is mutable". But again, this is the point I was trying to make, we are  
>> casting away a
>> const-like attribute and modifying the data.
> <snip>
>
> No more than we are already doing with the inout return.

Except that technique has been approved by Walter and included in the  
language.

-Steve


More information about the Digitalmars-d mailing list