What is the purpose of std::make_unique?
- A It is exception-safe in argument evaluation and avoids writing new explicitly
- B It is faster than new
- C It allocates on the stack
- D It creates a shared pointer
Answer
It is exception-safe in argument evaluation and avoids writing new explicitly
make_shared additionally allocates the object and its control block in a single allocation, which is more efficient than the two-step alternative.





