using opAssign or having my own assign function

Reiner Pope some at address.com
Sat Sep 8 01:59:28 PDT 2007


Martin d Anjou wrote:
>> void main()
>> {
>>     auto a = BitVector!(4)();
>>     auto b = BitVector!(10)();
>>     auto c = BitVector!(79)();
>>     writefln("A");
>>     a = b + c;
>>     writefln("B");
>>     c = b + c;
>> }
> 
> Nice. I got it to work too. Can the declaration look more like a 
> built-in (more user friendly), e.g. "BitVector!(4) bv;"?
> 
> Thanks,
> Martin

Isn't that exactly what it is?

BitVector!(4) bv = BitVector!(4)();

or did you mean

alias BitVector!(4) BV4;

BV4 a = BV4();



   -- Reiner



More information about the Digitalmars-d mailing list