Re: using assignment statement as conditional in a where

2016-12-03 Thread rikki cattermole via Digitalmars-d-learn
On 04/12/2016 7:26 AM, dan wrote: On Saturday, 3 December 2016 at 09:03:25 UTC, rikki cattermole wrote: On 03/12/2016 9:55 PM, dan wrote: [...] If you can use another compiler do so, gdc is on an old frontend/Phobos now. I recommend ldc or you know the reference compiler dmd if performance/pl

Re: using assignment statement as conditional in a where

2016-12-03 Thread dan via Digitalmars-d-learn
On Saturday, 3 December 2016 at 09:03:25 UTC, rikki cattermole wrote: On 03/12/2016 9:55 PM, dan wrote: [...] If you can use another compiler do so, gdc is on an old frontend/Phobos now. I recommend ldc or you know the reference compiler dmd if performance/platform isn't an issue (not that

Re: using assignment statement as conditional in a where

2016-12-03 Thread rikki cattermole via Digitalmars-d-learn
On 03/12/2016 9:55 PM, dan wrote: In c, you can have code like this: static void wtest( void ) { int f; while ( ( f = some_val( ) ) ) { printf(" our value is now: %d\n", f ); } } gcc compiles this without warning or error (at least if you use the double parentheses to assure the compi

using assignment statement as conditional in a where

2016-12-03 Thread dan via Digitalmars-d-learn
In c, you can have code like this: static void wtest( void ) { int f; while ( ( f = some_val( ) ) ) { printf(" our value is now: %d\n", f ); } } gcc compiles this without warning or error (at least if you use the double parentheses to assure the compiler that you realize you are test