Quantcast
Channel: Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1616

Intel C++ 2016: Constructor and Destructor in unnamed union will be called.

$
0
0
class Optional{
public:
  union {
    Value m_value; ///< should be uninitialized ! But Intel Compiler will Constructor and Destructor here!
  };
};

Intel C++ 2016 will call Constructor and Destructor for the class inside unnamed union.

But this should be deleted and like VS2015 compiler it would be great to get a message about this.


Viewing all articles
Browse latest Browse all 1616

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>