This bug has no comments. The original says: "The fix is obvious:
redefine postblit as this(const this); but it isn't always obvious
when looking at hundreds of lines of code...."

Is this accepted/correct? In the following if I include the this(const this) postblit it does not get called. It makes me question if the fix
is obvious?

Thanks
Dan


-------
import std.stdio;

struct S {
  static if(false) {
    this (const this) { writeln("const postblit");}
  } else {
    this (this) { writeln("non-const postblit");}
  }
}
void main () {
  const(S) s;
  S s2 = s;
}

Reply via email to