123. Move Semantics

Question.2

A developer moves a UART driver and then attempts to use the source object:

auto uart = std::make_unique<UART>(9600);
auto logger = std::move(uart);
uart->send(0x55);  // Use after move

What happens?

Need Help? Refer to the Quick Guide below

Select Answer