title: Why can't anonymous unions contain members with non-trivial constructors/destructors?
body: <p>I may be mistaken, but the basic explanation I've found has been that the union can't initialize because it doesn't know which member's constructor to call. The compiler can not automatically generate a constructor for the union.</p>
  
  <p>Why is the user not allowed to define the unions constructor? This would remove said issue and allow the presence of union members that have a non-trivial constructor/destructor.</p>
  
  <p>Also, why can't a union member have <em>any</em> custom constructors? The previous explanation doesn't stand for custom constructors.</p>
  
  <p>Update 1:</p>
  
  <p>Example:</p>
  
  <pre><code>struct SQuaternion
  {
      union
      {
          S3DVector Axis;
          struct
          {
              float X;
              float Y;
              float Z;
          };
      };
      float W;
  };
  </code></pre>
  
  <p>Note: The issue here seems to be that the union is anonymous. As such, how would one name the constructor of the union? It seems impossible to do so, merely because it has no name, and for no other reason. It'd be a terrible reason if it was a simple lexical issue...</p>
  
  <p>Update 2:
  Simply by wrapping the offending member in an enclosing anonymous structure, the error disappears. I suppose this is the closest thing one can do with an anonymous union. The fact that it ceases to be an issue still seems strange...</p>