Why am I unable to wrap dynamic arrays with shared_ptr despite using C++ 17?

Viewed 106

I have C++17 turned on and clang from Android NDK and I expect the below to work

std::shared_ptr<int[]> sp(new int[5]());

but I get

error: no matching constructor for initialization of 'std::shared_ptr<int []>'

How do I fix this ? This works fine on MSVC

0 Answers
Related