One Destructor Costs You Two
struct Widget {
std::vector<int> data; // 10 million elements
~Widget() { log("destroyed"); }
};
Widget make();
Widget w1 = make();
Widget w2 = std::move(w1);
Widget declares nothing but a destructor. More than one statement below is true. Select every true one.
Sign in to answer questions and track your progress
Sign In