diff --git a/libcxx/include/memory b/libcxx/include/memory --- a/libcxx/include/memory +++ b/libcxx/include/memory @@ -3831,8 +3831,6 @@ : nullptr);} #endif // _LIBCPP_NO_RTTI -#ifndef _LIBCPP_HAS_NO_VARIADICS - template static shared_ptr<_Tp> @@ -3843,37 +3841,6 @@ shared_ptr<_Tp> allocate_shared(const _Alloc& __a, _Args&& ...__args); -#else // _LIBCPP_HAS_NO_VARIADICS - - static shared_ptr<_Tp> make_shared(); - - template - static shared_ptr<_Tp> make_shared(_A0&); - - template - static shared_ptr<_Tp> make_shared(_A0&, _A1&); - - template - static shared_ptr<_Tp> make_shared(_A0&, _A1&, _A2&); - - template - static shared_ptr<_Tp> - allocate_shared(const _Alloc& __a); - - template - static shared_ptr<_Tp> - allocate_shared(const _Alloc& __a, _A0& __a0); - - template - static shared_ptr<_Tp> - allocate_shared(const _Alloc& __a, _A0& __a0, _A1& __a1); - - template - static shared_ptr<_Tp> - allocate_shared(const _Alloc& __a, _A0& __a0, _A1& __a1, _A2& __a2); - -#endif // _LIBCPP_HAS_NO_VARIADICS - private: template ::value> struct __shared_ptr_default_allocator @@ -4186,8 +4153,6 @@ __r.release(); } -#ifndef _LIBCPP_HAS_NO_VARIADICS - template template shared_ptr<_Tp> @@ -4227,165 +4192,6 @@ return __r; } -#else // _LIBCPP_HAS_NO_VARIADICS - -template -shared_ptr<_Tp> -shared_ptr<_Tp>::make_shared() -{ - static_assert((is_constructible<_Tp>::value), "Can't construct object in make_shared" ); - typedef __shared_ptr_emplace<_Tp, allocator<_Tp> > _CntrlBlk; - typedef allocator<_CntrlBlk> _Alloc2; - typedef __allocator_destructor<_Alloc2> _D2; - _Alloc2 __alloc2; - unique_ptr<_CntrlBlk, _D2> __hold2(__alloc2.allocate(1), _D2(__alloc2, 1)); - ::new(__hold2.get()) _CntrlBlk(__alloc2); - shared_ptr<_Tp> __r; - __r.__ptr_ = __hold2.get()->get(); - __r.__cntrl_ = __hold2.release(); - __r.__enable_weak_this(__r.__ptr_, __r.__ptr_); - return __r; -} - -template -template -shared_ptr<_Tp> -shared_ptr<_Tp>::make_shared(_A0& __a0) -{ - static_assert((is_constructible<_Tp, _A0>::value), "Can't construct object in make_shared" ); - typedef __shared_ptr_emplace<_Tp, allocator<_Tp> > _CntrlBlk; - typedef allocator<_CntrlBlk> _Alloc2; - typedef __allocator_destructor<_Alloc2> _D2; - _Alloc2 __alloc2; - unique_ptr<_CntrlBlk, _D2> __hold2(__alloc2.allocate(1), _D2(__alloc2, 1)); - ::new(__hold2.get()) _CntrlBlk(__alloc2, __a0); - shared_ptr<_Tp> __r; - __r.__ptr_ = __hold2.get()->get(); - __r.__cntrl_ = __hold2.release(); - __r.__enable_weak_this(__r.__ptr_, __r.__ptr_); - return __r; -} - -template -template -shared_ptr<_Tp> -shared_ptr<_Tp>::make_shared(_A0& __a0, _A1& __a1) -{ - static_assert((is_constructible<_Tp, _A0, _A1>::value), "Can't construct object in make_shared" ); - typedef __shared_ptr_emplace<_Tp, allocator<_Tp> > _CntrlBlk; - typedef allocator<_CntrlBlk> _Alloc2; - typedef __allocator_destructor<_Alloc2> _D2; - _Alloc2 __alloc2; - unique_ptr<_CntrlBlk, _D2> __hold2(__alloc2.allocate(1), _D2(__alloc2, 1)); - ::new(__hold2.get()) _CntrlBlk(__alloc2, __a0, __a1); - shared_ptr<_Tp> __r; - __r.__ptr_ = __hold2.get()->get(); - __r.__cntrl_ = __hold2.release(); - __r.__enable_weak_this(__r.__ptr_, __r.__ptr_); - return __r; -} - -template -template -shared_ptr<_Tp> -shared_ptr<_Tp>::make_shared(_A0& __a0, _A1& __a1, _A2& __a2) -{ - static_assert((is_constructible<_Tp, _A0, _A1, _A2>::value), "Can't construct object in make_shared" ); - typedef __shared_ptr_emplace<_Tp, allocator<_Tp> > _CntrlBlk; - typedef allocator<_CntrlBlk> _Alloc2; - typedef __allocator_destructor<_Alloc2> _D2; - _Alloc2 __alloc2; - unique_ptr<_CntrlBlk, _D2> __hold2(__alloc2.allocate(1), _D2(__alloc2, 1)); - ::new(__hold2.get()) _CntrlBlk(__alloc2, __a0, __a1, __a2); - shared_ptr<_Tp> __r; - __r.__ptr_ = __hold2.get()->get(); - __r.__cntrl_ = __hold2.release(); - __r.__enable_weak_this(__r.__ptr_, __r.__ptr_); - return __r; -} - -template -template -shared_ptr<_Tp> -shared_ptr<_Tp>::allocate_shared(const _Alloc& __a) -{ - static_assert((is_constructible<_Tp>::value), "Can't construct object in allocate_shared" ); - typedef __shared_ptr_emplace<_Tp, _Alloc> _CntrlBlk; - typedef typename __allocator_traits_rebind<_Alloc, _CntrlBlk>::type _Alloc2; - typedef __allocator_destructor<_Alloc2> _D2; - _Alloc2 __alloc2(__a); - unique_ptr<_CntrlBlk, _D2> __hold2(__alloc2.allocate(1), _D2(__alloc2, 1)); - ::new(static_cast(_VSTD::addressof(*__hold2.get()))) - _CntrlBlk(__a); - shared_ptr<_Tp> __r; - __r.__ptr_ = __hold2.get()->get(); - __r.__cntrl_ = _VSTD::addressof(*__hold2.release()); - __r.__enable_weak_this(__r.__ptr_, __r.__ptr_); - return __r; -} - -template -template -shared_ptr<_Tp> -shared_ptr<_Tp>::allocate_shared(const _Alloc& __a, _A0& __a0) -{ - static_assert((is_constructible<_Tp, _A0>::value), "Can't construct object in allocate_shared" ); - typedef __shared_ptr_emplace<_Tp, _Alloc> _CntrlBlk; - typedef typename __allocator_traits_rebind<_Alloc, _CntrlBlk>::type _Alloc2; - typedef __allocator_destructor<_Alloc2> _D2; - _Alloc2 __alloc2(__a); - unique_ptr<_CntrlBlk, _D2> __hold2(__alloc2.allocate(1), _D2(__alloc2, 1)); - ::new(static_cast(_VSTD::addressof(*__hold2.get()))) - _CntrlBlk(__a, __a0); - shared_ptr<_Tp> __r; - __r.__ptr_ = __hold2.get()->get(); - __r.__cntrl_ = _VSTD::addressof(*__hold2.release()); - __r.__enable_weak_this(__r.__ptr_, __r.__ptr_); - return __r; -} - -template -template -shared_ptr<_Tp> -shared_ptr<_Tp>::allocate_shared(const _Alloc& __a, _A0& __a0, _A1& __a1) -{ - static_assert((is_constructible<_Tp, _A0, _A1>::value), "Can't construct object in allocate_shared" ); - typedef __shared_ptr_emplace<_Tp, _Alloc> _CntrlBlk; - typedef typename __allocator_traits_rebind<_Alloc, _CntrlBlk>::type _Alloc2; - typedef __allocator_destructor<_Alloc2> _D2; - _Alloc2 __alloc2(__a); - unique_ptr<_CntrlBlk, _D2> __hold2(__alloc2.allocate(1), _D2(__alloc2, 1)); - ::new(static_cast(_VSTD::addressof(*__hold2.get()))) - _CntrlBlk(__a, __a0, __a1); - shared_ptr<_Tp> __r; - __r.__ptr_ = __hold2.get()->get(); - __r.__cntrl_ = _VSTD::addressof(*__hold2.release()); - __r.__enable_weak_this(__r.__ptr_, __r.__ptr_); - return __r; -} - -template -template -shared_ptr<_Tp> -shared_ptr<_Tp>::allocate_shared(const _Alloc& __a, _A0& __a0, _A1& __a1, _A2& __a2) -{ - static_assert((is_constructible<_Tp, _A0, _A1, _A2>::value), "Can't construct object in allocate_shared" ); - typedef __shared_ptr_emplace<_Tp, _Alloc> _CntrlBlk; - typedef typename __allocator_traits_rebind<_Alloc, _CntrlBlk>::type _Alloc2; - typedef __allocator_destructor<_Alloc2> _D2; - _Alloc2 __alloc2(__a); - unique_ptr<_CntrlBlk, _D2> __hold2(__alloc2.allocate(1), _D2(__alloc2, 1)); - ::new(static_cast(_VSTD::addressof(*__hold2.get()))) - _CntrlBlk(__a, __a0, __a1, __a2); - shared_ptr<_Tp> __r; - __r.__ptr_ = __hold2.get()->get(); - __r.__cntrl_ = _VSTD::addressof(*__hold2.release()); - __r.__enable_weak_this(__r.__ptr_, __r.__ptr_); - return __r; -} - -#endif // _LIBCPP_HAS_NO_VARIADICS - template shared_ptr<_Tp>::~shared_ptr() { diff --git a/libcxx/www/cxx1z_status.html b/libcxx/www/cxx1z_status.html --- a/libcxx/www/cxx1z_status.html +++ b/libcxx/www/cxx1z_status.html @@ -393,7 +393,7 @@ 2570[fund.ts.v2] conjunction and disjunction requirements are too strictIssaquah 2578Iterator requirements should reference iterator traitsIssaquahComplete 2584 ECMAScript IdentityEscape is ambiguousIssaquah - 2587"Convertible to bool" requirement in conjunction and disjunctionIssaquah + 2587"Convertible to bool" requirement in conjunction and disjunctionIssaquahResolved by 2567 2588[fund.ts.v2] "Convertible to bool" requirement in conjunction and disjunctionIssaquah 2589match_results can't satisfy the requirements of a containerIssaquahComplete 2591std::function's member template target() should not lead to undefined behaviourIssaquahComplete