title: Are constructors thread safe in C++ and/or C++11?
body: <p><a href="https://stackoverflow.com/questions/10250043/double-checked-locking-around-value-going-to-null">Derived from this question</a> and <a href="https://stackoverflow.com/questions/796099/c-new-operator-thread-safety-in-linux-and-gcc-4">related to this question</a>:</p>
  
  <p>If I construct an object in one thread and <em>then</em> convey a reference/pointer to it to another thread, is it thread un-safe for that other thread to access the object without explicit locking/memory-barriers?</p>
  
  <pre><code>// thread 1
  Obj obj;
  
  anyLeagalTransferDevice.Send(&amp;obj);
  while(1); // never let obj go out of scope
  
  // thread 2
  anyLeagalTransferDevice.Get()-&gt;SomeFn();
  </code></pre>
  
  <p>Alternatively: is there any legal way to convey data between threads that doesn't enforce memory ordering with regards to everything <em>else</em> the thread has touched? From a hardware standpoint I don't see any reason it shouldn't be possible.</p>
  
  <p>To clarify; the question is with regards to cache coherency, memory ordering and whatnot. Can Thread 2 get and use the pointer before Thread 2's view of memory includes the writes involved in constructing <code>obj</code>? To miss-quote Alexandrescu(?) <strong>"Could a malicious CPU designer and compiler writer collude to build a standard conforming system that make that break?"</strong></p>