Re: BitArray - incomplete implementation?

2015-01-23 Thread anony via Digitalmars-d-learn
On Saturday, 24 January 2015 at 00:13:34 UTC, Laeeth Isharc wrote: Hi. Should the following code work? Yes, that error is caused by a bug of BitArray(https://issues.dlang.org/show_bug.cgi?id=13806). Having init function broke template constraints of chain(and must break dozen of other

Re: BitArray - incomplete implementation?

2015-01-23 Thread Laeeth Isharc via Digitalmars-d-learn
To avoid confusion, the below is the code that fits the error message: import std.bitmanip; import std.stdio; import std.array; import std.range:chain; void test() { int[] a=[1,2,3,4,5]; int[] b=[5,4,3,2,1]; int[] c = chain(a,b).array; // chain two arrays of int

BitArray - incomplete implementation?

2015-01-23 Thread Laeeth Isharc via Digitalmars-d-learn
Hi. Should the following code work? import std.bitmanip; import std.stdio; import std.array; import std.range:chain; void test() { int[] a=[1,2,3,4,5]; int[] b=[5,4,3,2,1]; int[] c = chain(a,b).array; // chain two arrays of int writefln(%s,c); } void test2() {

Re: BitArray - incomplete implementation?

2015-01-23 Thread Laeeth Isharc via Digitalmars-d-learn
Yes, that error is caused by a bug of BitArray(https://issues.dlang.org/show_bug.cgi?id=13806). Having init function broke template constraints of chain(and must break dozen of other templates). pragma(msg, ElementType!(BitArray[])) // prints 'pure nothrow void(bool[] ba)' - ElementType uses