Skip to content
← All tracks

Copy, Move, and the Rule of Zero

C++

Where C++ stops resembling other languages. Before containers on purpose: a learner who has not felt the cost of a copy reads `performance-*` as nagging rather than as arithmetic.

This track is written for C++, which isn't the mode you're browsing in.

0 / 5 solved
  1. 1. Not solved yet. The copy you did not write
  2. 2. Not solved yet. std::move does not move anything
  3. 3. Not solved yet. The line that does nothing, twice a second
  4. 4. Not solved yet. Owning something raw costs you five functions
  5. 5. Not solved yet. What is left after you move from it

Check yourself

4 questions · one attempt each

These do not count toward finishing the track. They are here to catch the things that are easy to read past.

0 / 4

How many objects does each line construct?

v.push_back(Tr{});
v.emplace_back();
Question 1 of 4