I was given an API for some library (nng to be exact) it has a C-like interface for allocating and deallocating a message object:
int nng_msg_alloc(nng_msg **, size_t);
void nng_msg_free(nng_msg *);
I'm trying to create a C++ interface for the library. I would like to create a shared_ptr of a nng_msg object, but I'm struggling with the implementation. How do i pass the allocator and deallocator to the shared object?