In using std::unique_ptr
with a custom deleter I desire to use std::make_unique
rather than a raw new. I am using VC++2013. It appears to me that there is no way to use std::unique_ptr
if you are using a custom deleter. Did I miss something or is this really the case?
Additional Information:
I am using a std::unique_ptr<HANDLE, custom_deleter>
to hold a Windows HANDLE for an opened COM port.
I could write a custom RAII class for this, and it wouldn't be terribly difficult, but I was seeing how hard/difficult/bad it would be to use std::unique_ptr
.