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
MSVC C2888 bug
Rounding in C++
regex select, find
#32
What exactly is “broken” with Microsoft Visual C++'s two-phase template instantiation?
C++ exception
LinkedList
sharedptr emptiness
narrow_cast
constexpr internal error