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
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
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:
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