title: Does swift copy on write for all structs?
body: <p>I know that swift will optimize to copy on write for arrays but will it do this for all structs? For example:</p>
  
  <pre><code>struct Point {
     var x:Float = 0
  }
  
  var p1 = Point()
  var p2 = p1 //p1 and p2 share the same data under the hood
  p2.x += 1 //p2 now has its own copy of the data
  </code></pre>