I have been trying to dynamically allocate a shared pointer in C++. However, I keep getting the errors
/usr/include/boost/make_shared.hpp:15:0: In installation of 'class boost::detail::sp_ms_deleter<char []>':
In file included from /usr/include/boost/make_shared.hpp:15:0,
from main.cpp:10:
/usr.include/boost/smart_ptr/make_shared.hpp:140:64: required from 'boost::shared_ptr<X> boost::make_shared(Args&& ... ) [with T = char []; Args = { char*} ]'
/usr/include/smart_ptr/make_shared.hpp:41:48: error: invalid application of 'sizeof' to incomplete type 'char []'
boost::shared_ptr<char[]> A = boost::make_shared<char[]>(50);
Using std::shared_ptr I get similar errors.
I need a way to allocate a dynamic array without using the new keywords as these are project requirements, so another method of doing that could be a valid solution for me as well.