Re: SList of chars not possible?

2012-11-02 Thread Simen Kjaeraas
On 2012-18-01 23:11, They call me Mr. D khea...@eapl.org wrote: auto i = SList!int(1, 2, 3, 4, 5, 6, 7); auto f = SList!float(1.1, 2.234, 3.21, 4.3, 5.001, 6.2, 7.0); auto s = SList!string([I, Hello, World]); auto c = SList!char('a', 'b' ,'c'); // doesn't compile, get the following

Re: SList of chars not possible?

2012-11-02 Thread Tobias Pankrath
The error is: the constructor of SList!T takes a U[] if U is implicitly convertible to T, but forwards to insertFront which requires a range of T. But inside phobos char[] is a range of dchar, so if fails. Imo a clear bug. Not sure of the exact reasons, but I think Ali is probably right. A

SList of chars not possible?

2012-11-01 Thread They call me Mr. D
auto i = SList!int(1, 2, 3, 4, 5, 6, 7); auto f = SList!float(1.1, 2.234, 3.21, 4.3, 5.001, 6.2, 7.0); auto s = SList!string([I, Hello, World]); auto c = SList!char('a', 'b' ,'c'); // doesn't compile, get the following C:\D\dmd2\windows\bin\..\..\src\phobos\std\container.d(905): Error:

Re: SList of chars not possible?

2012-11-01 Thread Ali Çehreli
On 11/01/2012 03:18 PM, They call me Mr. D wrote: auto i = SList!int(1, 2, 3, 4, 5, 6, 7); auto f = SList!float(1.1, 2.234, 3.21, 4.3, 5.001, 6.2, 7.0); auto s = SList!string([I, Hello, World]); auto c = SList!char('a', 'b' ,'c'); // doesn't compile, get the following