Skip to content

Instantly share code, notes, and snippets.

@DevO2012
Created April 16, 2015 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DevO2012/e3e1f011b890e0ae7ff6 to your computer and use it in GitHub Desktop.
Save DevO2012/e3e1f011b890e0ae7ff6 to your computer and use it in GitHub Desktop.
class Value
{
public:
Value() { printf(" Value \n"); }
~Value() { printf("~Value \n"); }
};
class Optional
{
public:
Optional() {}
~Optional() {}
private:
union {
Value m_value; ///< should be uninitialized ! But Intel Compiler will call Constructor and Destructor here!
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment