is(...) with alias this

2013-01-05 Thread Zhenya
Hi! I just read the David's post http://forum.dlang.org/thread/kc9e74$bg7$1...@digitalmars.com " This code worked with dmd 2.060: import std.stdio; import std.traits; struct OhWhy(S) { S[] arr; alias arr this; } void main() { static assert(isArray!(OhWhy!(float))); } B

Re: is(...) with alias this

2013-01-05 Thread Philippe Sigaud
I think the alias this transformation is done 'before' any usual conversion. I guess it's a real replacement inside the code (I'm not sure how to explain my feeling). But in any case, since OhWhy!(float) type is ... OhWhy!(float), I agree this should fail.

Re: is(...) with alias this

2013-01-05 Thread monarch_dodra
On Saturday, 5 January 2013 at 22:09:45 UTC, Philippe Sigaud wrote: I think the alias this transformation is done 'before' any usual conversion. I guess it's a real replacement inside the code (I'm not sure how to explain my feeling). But in any case, since OhWhy!(float) type is ... OhWhy!(flo

Re: is(...) with alias this

2013-01-06 Thread Zhenya
On Saturday, 5 January 2013 at 22:17:08 UTC, monarch_dodra wrote: On Saturday, 5 January 2013 at 22:09:45 UTC, Philippe Sigaud wrote: I think the alias this transformation is done 'before' any usual conversion. I guess it's a real replacement inside the code (I'm not sure how to explain my fee