F i L wrote:
struct Test { int value; this() { GC.setAttr(&value, NO_SCAN); } }
bleh, should be... struct Test { int value; this(int v) { GC.setAttr(&value, GC.BlkAttr.NO_SCAN); } }Or something like that. I've never actually set GC attributes before.
But this also raises another issue. Structs don't have default constructors, so applying NoScan attributes (by default) is, to my knowledge, impossible. Whereas it could (?) be possible through attributes.