title: C++ lifetime of union member
body: <p>In the current version of the C++ standard draft, <a href="http://eel.is/c++draft/basic.life#1" rel="nofollow noreferrer">[basic.life]/1</a>  states:</p>
  <blockquote>
  <p>The lifetime of an object or reference is a runtime property of the
  object or reference. A variable is said to have vacuous initialization
  if it is default-initialized and, if it is of class type or a
  (possibly multi-dimensional) array thereof, that class type has a
  trivial default constructor. The lifetime of an object of type T
  begins when:</p>
  <ul>
  <li><p>storage with the proper alignment and size for type T is obtained, and</p>
  </li>
  <li><p>its initialization (if any) is complete (including vacuous
  initialization) ([dcl.init]),</p>
  </li>
  </ul>
  <p><strong>except that if the object is a union
  member or subobject thereof, its lifetime only begins if that union
  member is the initialized member in the union ([dcl.init.aggr],
  [class.base.init]), or as described in [class.union]</strong>. [...]</p>
  </blockquote>
  <p>From that paragraph I understand that the only way a member of a union begins its lifetime is if:</p>
  <ul>
  <li>that member &quot;is the initialized member in the union&quot; (e.g. if it is referenced in a <code>mem-initializer</code>), or</li>
  <li>some other way mentioned in [class.union]</li>
  </ul>
  <p>However, the only <em>normative</em> paragraph in [class.union] that specifies how a union member can begin its lifetime is <a href="http://eel.is/c++draft/class.union#5" rel="nofollow noreferrer">[class.union]/5</a> (but it only applies to specific types, i.e. either <code>non-class</code>, <code>non-array</code>, or <code>class</code> type with a <code>trivial</code> constructor that is not deleted, or array of such types).</p>
  <p>The next paragraph, <a href="http://eel.is/c++draft/class.union#6" rel="nofollow noreferrer">[class.union]/6</a> (comprising a note and an example, therefore it contains no <em>normative</em> text), describes a way to change the active member of a union, by using a <code>placement new-expression</code>, such as <code>new (&amp;u.n) N;</code>, where</p>
  <pre><code>struct N { N() { /* non-trivial constructor */ } };
  struct M { M() { /* non-trivial constructor */ } };
  
  union 
  {
      N n;
      M m;
  } u;
  </code></pre>
  <p>My question is where in the standard is it specified that <code>new (&amp;u.n) N;</code> begins the lifetime of <code>u.n</code>?</p>
  <p>Thank you!</p>