Re: Bug in Auto Functions and Template? Or Am I Just Crazy...

2012-06-28 Thread Michael
Good I know I spotted something _real_ this time! On Wednesday, 27 June 2012 at 11:55:11 UTC, Timon Gehr wrote: On 06/27/2012 01:24 PM, Timon Gehr wrote: On 06/27/2012 11:07 AM, Michael wrote: Hello all, I came across some weird behaviors yesterday and I can't figure out what it's about.

Re: Bug in Auto Functions and Template? Or Am I Just Crazy...

2012-06-27 Thread Timon Gehr
On 06/27/2012 01:24 PM, Timon Gehr wrote: On 06/27/2012 11:07 AM, Michael wrote: Hello all, I came across some weird behaviors yesterday and I can't figure out what it's about. (1) auto factorial(int n) { if (n < 2) return 1; return n * factorial(n-1); } The compiler complained ab

Re: Bug in Auto Functions and Template? Or Am I Just Crazy...

2012-06-27 Thread Timon Gehr
On 06/27/2012 11:07 AM, Michael wrote: Hello all, I came across some weird behaviors yesterday and I can't figure out what it's about. (1) auto factorial(int n) { if (n < 2) return 1; return n * factorial(n-1); } The compiler complained about "forward declaration of factorial". If

Re: Bug in Auto Functions and Template? Or Am I Just Crazy...

2012-06-27 Thread Tobias Pankrath
On Wednesday, 27 June 2012 at 09:07:57 UTC, Michael wrote: Hello all, I came across some weird behaviors yesterday and I can't figure out what it's about. (1) auto factorial(int n) { if (n < 2) return 1; return n * factorial(n-1); } The compiler complained about "forward dec

Bug in Auto Functions and Template? Or Am I Just Crazy...

2012-06-27 Thread Michael
Hello all, I came across some weird behaviors yesterday and I can't figure out what it's about. (1) auto factorial(int n) { if (n < 2) return 1; return n * factorial(n-1); } The compiler complained about "forward declaration of factorial". If I change the return type to int,