Re: "ref const" parameters in functions

2012-04-01 Thread L-MAN
On Monday, 2 April 2012 at 05:03:48 UTC, Jonathan M Davis wrote: On Sunday, April 01, 2012 21:23:50 Jonathan M Davis wrote: On Monday, April 02, 2012 05:46:24 L-MAN wrote: Sure, if you have large structs, making a lot of copies of them can be expensive. But to avoid that, you're going to

Re: "ref const" parameters in functions

2012-04-01 Thread L-MAN
On Sunday, 1 April 2012 at 08:22:08 UTC, Jonathan M Davis wrote: On Sunday, April 01, 2012 09:10:58 L-MAN wrote: On Saturday, 31 March 2012 at 21:42:05 UTC, Jonathan M Davis wrote: > On Saturday, March 31, 2012 23:25:51 L-MAN wrote: >> Hello everybody! >> >> I'm tryi

Re: "ref const" parameters in functions

2012-04-01 Thread L-MAN
On Saturday, 31 March 2012 at 21:42:05 UTC, Jonathan M Davis wrote: On Saturday, March 31, 2012 23:25:51 L-MAN wrote: Hello everybody! I'm trying to use some function FN like this: struct X { protected double _x; // double type for example public @property double X() const { retu

Re: "ref const" parameters in functions

2012-03-31 Thread L-MAN
On Saturday, 31 March 2012 at 21:42:05 UTC, Jonathan M Davis wrote: On Saturday, March 31, 2012 23:25:51 L-MAN wrote: Hello everybody! I'm trying to use some function FN like this: struct X { protected double _x; // double type for example public @property double X() const { retu

"ref const" parameters in functions

2012-03-31 Thread L-MAN
Hello everybody! I'm trying to use some function FN like this: struct X { protected double _x; // double type for example public @property double X() const { return _x; } // ctor public this(double x) { _x = x; } // double type for example void FN(ref const(double) in_x) // double type f