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

A type follows the Rule of Zero by holding all resources in members like std::vector and std::unique_ptr and declaring none of the special members. If one of those members is a std::unique_ptr, what is the resulting copyability and movability of the enclosing class?

struct Handle { std::vector<int> buf; std::unique_ptr<Impl> impl; // no special members declared };