dup method const or not?

mta`chrono chrono at mta-international.net
Sun Nov 27 14:48:14 PST 2011


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);
}
---


More information about the Digitalmars-d-learn mailing list