Why the destructor of vector is called after "g" call? Thank you.
C++
int g(vector vi);
void f(vector&& vi) {
g(move(vi));
}Why the destructor of vector is called after "g" call? Thank you.
int g(vector vi);
void f(vector&& vi) {
g(move(vi));
}Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Answers
Know the answer? Post it. Somebody with the same question will find it here.