The program below does not compile. Which statement correctly describes the problem?
#include <iostream>
#include <memory>
struct Account {
std::unique_ptr<int> balance = std::make_unique<int>(500);
};
int main() {
Account a;
Account b = a;
std::cout << *b.balance << '\n';
return 0;
}
Rule of zero works both ways: a move-only member makes the class move-only.