Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumC++rule of 5 and rule of 0Single-choice MCQ

A class declares a copy constructor (to log copies) but nothing else. What is the status of its move constructor, and what does `T b = std::move(a);` do?

struct T { std::vector<int> data; T(const T& o) : data(o.data) { /* log */ } T() = default; }; T a; T b = std::move(a); // what runs?