using opAssign or having my own assign function

Matti Niemenmaa see_signature at for.real.address
Sat Sep 8 04:02:34 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;"?
> 

Since BitVector's opCall does practically nothing, you might as well remove it.
You could write just "BitVector!(4) bv;" even now, with no difference to "auto
bv = BitVector!(4)();"

-- 
E-mail address: matti.niemenmaa+news, domain is iki (DOT) fi



More information about the Digitalmars-d mailing list