Libc++ incorrectly rejects the following code. Reproducer from stack overflow: // clang++ -std=c++14 test.cpp #include <memory> int main() { auto up = std::unique_ptr<int[]>(new int[5]{}); auto sp = std::shared_ptr<int>(std::move(up)); } I'm not yet 100% sure this is the behavior required be the C++17 standard, but It needs to be investigated and libc++ is most likely wrong.
So both C++11 and C++14 seem to allow this, but it appears to be forbidden in C++17 after applying p0414r2.
Fixed by https://reviews.llvm.org/D80882.