Re: Compiler fails to match array literal to byte[] in templated functions (Was: Re: More putrid beef soup (Was: Re: Implicit string lit conversion) to wstring/dstring)

2012-03-19 Thread Timon Gehr
On 03/19/2012 04:40 AM, H. S. Teoh wrote: OK, perhaps the previous subject line of the previous post deterred people from actually reading the contents. :-( Basically, I'm trying to address Andrei's request that this should work with my AA implementation: int[dstring] aa; aa["ab

Re: Compiler fails to match array literal to byte[] in templated functions (Was: Re: More putrid beef soup (Was: Re: Implicit string lit conversion) to wstring/dstring)

2012-03-18 Thread James Miller
On 19 March 2012 16:40, H. S. Teoh wrote: > OK, perhaps the previous subject line of the previous post deterred > people from actually reading the contents. :-( > > Basically, I'm trying to address Andrei's request that this should work > with my AA implementation: > >        int[dstring] aa; >  

Compiler fails to match array literal to byte[] in templated functions (Was: Re: More putrid beef soup (Was: Re: Implicit string lit conversion) to wstring/dstring)

2012-03-18 Thread H. S. Teoh
OK, perhaps the previous subject line of the previous post deterred people from actually reading the contents. :-( Basically, I'm trying to address Andrei's request that this should work with my AA implementation: int[dstring] aa; aa["abc"] = 1; // "abc" implicitly deduced as dst

More putrid beef soup (Was: Re: Implicit string lit conversion to wstring/dstring)

2012-03-17 Thread H. S. Teoh
On Wed, Mar 14, 2012 at 02:07:04PM -0500, Andrei Alexandrescu wrote: [...] > Aha! This is one of those cases in which built-in magic smells of > putrid beef soup. [...] It gets worse than we first thought: void f1(dstring x) { dstring y = x; } void f2()(dstring x) { dstring y = x