On 2011-11-27 23:48, mta`chrono wrote: > that's a real good question. it fails with the following error: > > Error: function std.bitmanip.BitArray.dup () is not callable using > argument types () const > > > here is a hack: > > --- > import std.bitmanip; > import core.stdc.string; > > void main() > { > const(BitArray) foo; > BitArray bar; > > memcpy(&bar, &foo, BitArray.sizeof); > }
Well, this hack doesn't even work - as it does a shallow copy only, immediately setting bits of bar also changes bits of foo! Matthias