dup method const or not?

mta`chrono chrono at mta-international.net
Mon Nov 28 02:58:08 PST 2011


Okay, what about this hack?

---
import std.bitmanip;
import core.stdc.string;

void main()
{
    const(BitArray) foo;
    BitArray bar;

    bar.len = foo.len;
    bar.ptr = foo.ptr[0 .. foo.dim].dup.ptr;
}
---


More information about the Digitalmars-d-learn mailing list