   classes in unions
  Two classes :class x{    int *_x;public:    x(){ _x = new int[1000]; }    ~x(){ delete [] _x; }};class y{    float *_y;public:    y(){ _y = new float[100]; }    ~y(){ delete [] _y; }};and a struct - struct xy{  union    {   x X;   y Y;    } m_xy;};What happens when an object of xy is created? Obvously the compilercan't know which member of the union you are going to use, so whatabout construction? What about when xy is destroyed? What destructorwould be called?    
  nevermind, I guess you just can't do that.;  Yes since unions members share the same memory and the union doesn't know which variable is the one that's set it has no way of knowing which destructor to call. You can only use POD's in unions.CheersChris   ;  I think you can do it with boost::optional though.   