I am trying to switch my code to use make_shared<type>()
but I have a lot of incomplete types (complete at the time of creation) and was wondering if there is anyway make_shared would work with incomplete types or allow me to pass a deleter type.
I looked around and didn't find any posts related to this so either this just works ?? or I am overlooking something basic.
#define NEW_PARAMS(Type, ...) ::std::shared_ptr<Type>(new (Type)(__VA_ARGS__), ::std::default_delete<Type>())
Above is the macro I use to create new objects. Would like to convert this to
#define NEW_PARAMS(Type, ...) ::std::make_shared<Type>(__VA_ARGS__, ::std::default_delete<Type>())
EDIT: Just to clarify I wanted to ask if I could pass a deleter type to the shared_ptr
created with make_shared