Do I need to wrap
std::unique_ptr usage with
try/catch in code which should be exception safe?
std::unique_ptr will hold a raw memory block created by
::malloc (with my custom deleter to call
- All of
std::unique_ptr's constructors* are
mallocwon't throw any exception on failure... it will just return
- I believe your deleter's constructors won't throw anything either.
So you don't need to catch anything, since nothing will be thrown.
*: See C++11 §220.127.116.11.1
unique_ptr constructors [unique.ptr.single.ctor]