Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Is a Union Member's Destructor Called
#include <iostream> #include <string> #include <vector> using namespace std; int main() { union S { string str; vector<int> vec; ~S() {} } s = { "Hello, world"s }; cout << s.str.size() << endl; }
run
|
edit
|
history
|
help
0
1337
accessibility on in-class typedefs
IBE FT ParseFileName
no-thread
bad_cast
#22.2
hangman
VS'15 parameter pack sfinae
atoi on hex
Test