Question.2
Two developers create a unique_ptr:
Developer A:
std::unique_ptr<Sensor> s(new Sensor(5));
Developer B:
auto s = std::make_unique<Sensor>(5);
Which is preferred?
Select Answer
Developer A -- explicit new is clearer
Developer B -- make_unique is exception-safe, avoids writing new, and clearly expresses intent
Both are identical in every way
Developer A -- make_unique is not available on embedded compilers