Tango BitArray Initialization
Sean Kelly
sean at f4.ca
Tue Feb 13 09:26:11 PST 2007
Colin Huang wrote:
> Sean Kelly Wrote:
>
>> Oddly, I wasn't able to get static opAssign to work with this syntax.
>> It seemed to want "BitArray = 0" rather than "BitArray b = 0". I've
>> modified Tango's BitArray to support:
>>
>> BitArray b = [0,1,0,1];
>> b = [1,0,1,0];
>>
>> which is consistent with how built-in arrays work.
>>
>>
>> Sean
>
> Good work :)
By the way, I think the above will break when implicit type conversions
are added, because [0,1,0,1] is currently passed as a bool[]. I'll need
to think about this a bit more, since [true,false,true,false] kind of
stinks, as does accepting an array of ubyte or some such. This is an
issue Walter will have to face as well since Phobos BitArray will have
the same problem.
Sean
More information about the Digitalmars-d-learn
mailing list