Question.2
A developer tries to copy a unique_ptr:
auto uart = std::make_unique<UART_Driver>(9600); auto uart2 = uart; // Copy
Will this compile?
Select Answer
Yes -- both point to the same driver
No -- unique_ptr copying is banned; it enforces exclusive ownership. Use std::move to transfer ownership
Yes -- but only in C++17
No -- unique_ptr cannot hold class objects