for non-libc++. I've reported allowance of these conversions as a bug at https://llvm.org/PR53368.
Differential Revision: https://reviews.llvm.org/D117996
assert(B::count == 0);
assert(A::count == 0);
+#ifdef _LIBCPP_VERSION // https://llvm.org/PR53368
{
std::unique_ptr<A[]> ptr(new A[8]);
A* raw_ptr = ptr.get();
std::shared_ptr<int> p;
p = std::move(ptr);
}
+#endif // _LIBCPP_VERSION
#if TEST_STD_VER > 14
{
assert(A::count == 0);
assert(B::count == 0);
+#ifdef _LIBCPP_VERSION // https://llvm.org/PR53368
{
std::unique_ptr<A[]> ptr(new A[8]);
A* raw_ptr = ptr.get();
}
assert(A::count == 0);
assert(B::count == 0);
+#endif // _LIBCPP_VERSION
{
std::unique_ptr<A[]> ptr(new A[8]);
}
assert(A::count == 0);
+#ifdef _LIBCPP_VERSION // https://llvm.org/PR53368
{
std::unique_ptr<A[]> ptr(new A[8]);
A* raw_ptr = ptr.get();
std::unique_ptr<int[]> ptr(new int[8]);
std::shared_ptr<int> p(std::move(ptr));
}
+#endif // _LIBCPP_VERSION
#if TEST_STD_VER > 14
{
assert(A::count == 0);
assert(B::count == 0);
+#ifdef _LIBCPP_VERSION // https://llvm.org/PR53368
{
std::unique_ptr<A[]> ptr(new A[8]);
A* raw_ptr = ptr.get();
}
assert(A::count == 0);
assert(B::count == 0);
+#endif // _LIBCPP_VERSION
{
std::unique_ptr<A[]> ptr(new A[8]);