Re:Why C++ sucks (2016 edition)
by gpderetta on Monday February 22, 2016 @09:56AM
(#11151139)
Note that in C++11 is perfectly fine to put a type with a non trivial constructor in an union.
You are right about the issue with std::vector and incomplete types. It will be possibly resolved in the next standard. In the meantime you can use something like boost::container::vector which explicitly support incomplete types.
You are right about the issue with std::vector and incomplete types. It will be possibly resolved in the next standard. In the meantime you can use something like boost::container::vector which explicitly support incomplete types.