Re: inout based on this reference?

2010-08-30 Thread Steven Schveighoffer
On Mon, 30 Aug 2010 13:49:20 -0400, Simen kjaeraas wrote: Steven Schveighoffer wrote: 0123456789012345678901234567890123456789012345678901234567890123456789012 On Sun, 29 Aug 2010 17:36:24 -0400, Simen kjaeraas wrote: Is it possible to make a function return dependent upon the constancy

Re: inout based on this reference?

2010-08-30 Thread Simen kjaeraas
Steven Schveighoffer wrote: 0123456789012345678901234567890123456789012345678901234567890123456789012 On Sun, 29 Aug 2010 17:36:24 -0400, Simen kjaeraas wrote: Is it possible to make a function return dependent upon the constancy of the this reference? i.e. this: struct foo { int n;

Re: inout based on this reference?

2010-08-30 Thread Steven Schveighoffer
On Sun, 29 Aug 2010 17:36:24 -0400, Simen kjaeraas wrote: Is it possible to make a function return dependent upon the constancy of the this reference? i.e. this: struct foo { int n; inout( ref int ) getn( ) inout { return n; } } Yes. That is the bread-and-butter usa

Re: inout based on this reference?

2010-08-30 Thread Steven Schveighoffer
On Mon, 30 Aug 2010 09:08:11 -0400, Steven Schveighoffer wrote: On Sun, 29 Aug 2010 17:36:24 -0400, Simen kjaeraas wrote: Is it possible to make a function return dependent upon the constancy of the this reference? i.e. this: struct foo { int n; inout( ref int ) getn( ) inout

inout based on this reference?

2010-08-29 Thread Simen kjaeraas
Is it possible to make a function return dependent upon the constancy of the this reference? i.e. this: struct foo { int n; inout( ref int ) getn( ) inout { return n; } } -- Simen