Re: Feature request: Attribute to delay evaluation of function argument

2012-11-04 Thread Oleg Endo
On Sun, 2012-11-04 at 18:08 +1100, Clinton Mead wrote: > Hi Oleg > > Could you explain how you get around the following: > > (1) Doesn't the non-overloaded operator&& return 'bool', not > 'TriBool'? Yes, by default it takes bool on both sides and returns bool. > How can it be made to return 'T

Re: Feature request: Attribute to delay evaluation of function argument

2012-11-04 Thread Clinton Mead
On Sun, Nov 4, 2012 at 12:33 PM, Oleg Endo wrote: > On Sun, 2012-11-04 at 11:02 +1100, Clinton Mead wrote: >> Hi All >> >> This is a feature request. To explain, lets say I want to create a >> TriBool type, like so: >> >> enum TriBool { False, True, Unknown }; >> >> I now want to implement operato

Re: Feature request: Attribute to delay evaluation of function argument

2012-11-03 Thread Oleg Endo
On Sun, 2012-11-04 at 11:02 +1100, Clinton Mead wrote: > Hi All > > This is a feature request. To explain, lets say I want to create a > TriBool type, like so: > > enum TriBool { False, True, Unknown }; > > I now want to implement operator&&. I want operator&& to short > circuit, i.e. if the fir

Feature request: Attribute to delay evaluation of function argument

2012-11-03 Thread Clinton Mead
Hi All This is a feature request. To explain, lets say I want to create a TriBool type, like so: enum TriBool { False, True, Unknown }; I now want to implement operator&&. I want operator&& to short circuit, i.e. if the first argument is False the second argument shouldn't be evaluated. So I'll