Implicit string lit conversion to wstring/dstring

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Mar 14 12:52:00 PDT 2012


On 3/14/12 2:34 PM, H. S. Teoh wrote:
> I tried the following, but it still doesn't work properly:
>
> 	void opIndexAssign()(in Value v, in Key key)
> 	{
> 		__opIndexAssignImpl(v, key);
> 	}
>
> 	void opIndexAssign(K)(in Value v, in K key)
> 		if (!is(K==Key)&&  isCompatWithKey!K)
> 	{
> 		__opIndexAssignImpl(v, key);
> 	}

Try special casing for the exact types (string, char[] etc), get that 
working, and then generalize from there.

Andrei


More information about the Digitalmars-d mailing list