diff --git a/libcxx/include/memory b/libcxx/include/memory --- a/libcxx/include/memory +++ b/libcxx/include/memory @@ -3597,7 +3597,6 @@ typename enable_if::value, __nat>::type = __nat()); #endif #endif -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template shared_ptr(unique_ptr<_Yp, _Dp>&&, typename enable_if @@ -3616,26 +3615,6 @@ is_convertible::pointer, element_type*>::value, __nat >::type = __nat()); -#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES - template - shared_ptr(unique_ptr<_Yp, _Dp>, - typename enable_if - < - !is_lvalue_reference<_Dp>::value && - !is_array<_Yp>::value && - is_convertible::pointer, element_type*>::value, - __nat - >::type = __nat()); - template - shared_ptr(unique_ptr<_Yp, _Dp>, - typename enable_if - < - is_lvalue_reference<_Dp>::value && - !is_array<_Yp>::value && - is_convertible::pointer, element_type*>::value, - __nat - >::type = __nat()); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES ~shared_ptr(); @@ -4060,11 +4039,7 @@ template template -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES shared_ptr<_Tp>::shared_ptr(unique_ptr<_Yp, _Dp>&& __r, -#else -shared_ptr<_Tp>::shared_ptr(unique_ptr<_Yp, _Dp> __r, -#endif typename enable_if < !is_lvalue_reference<_Dp>::value && @@ -4090,11 +4065,7 @@ template template -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES shared_ptr<_Tp>::shared_ptr(unique_ptr<_Yp, _Dp>&& __r, -#else -shared_ptr<_Tp>::shared_ptr(unique_ptr<_Yp, _Dp> __r, -#endif typename enable_if < is_lvalue_reference<_Dp>::value && diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp @@ -94,16 +94,9 @@ } catch (...) { -#if TEST_STD_VER >= 11 assert(A::count == 1); assert(B::count == 1); assert(ptr.get() == raw_ptr); -#else - (void) raw_ptr; // silence 'unused variable' warning - assert(A::count == 0); - assert(B::count == 0); - assert(ptr.get() == 0); -#endif // TEST_STD_VER >= 11 } } #endif