12 ms·
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 ty
by gpderetta 11y ago
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.