Revert 238354 while I figure out what broke in weak_ptr
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@238355 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -4040,14 +4040,14 @@ private:
|
|||||||
template <class _Yp>
|
template <class _Yp>
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
void
|
void
|
||||||
__enable_weak_this(const volatile enable_shared_from_this<_Yp>* __e) _NOEXCEPT
|
__enable_weak_this(const enable_shared_from_this<_Yp>* __e) _NOEXCEPT
|
||||||
{
|
{
|
||||||
if (__e)
|
if (__e)
|
||||||
__e->__weak_this_ = *this;
|
__e->__weak_this_ = *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
void __enable_weak_this(const volatile void*) _NOEXCEPT {}
|
void __enable_weak_this(const void*) _NOEXCEPT {}
|
||||||
|
|
||||||
template <class _Up> friend class _LIBCPP_TYPE_VIS_ONLY shared_ptr;
|
template <class _Up> friend class _LIBCPP_TYPE_VIS_ONLY shared_ptr;
|
||||||
template <class _Up> friend class _LIBCPP_TYPE_VIS_ONLY weak_ptr;
|
template <class _Up> friend class _LIBCPP_TYPE_VIS_ONLY weak_ptr;
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ void test(const T &t0)
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
test<bool>(true);
|
// test<bool>(true);
|
||||||
test<int>(3);
|
// test<int>(3);
|
||||||
test<double>(5.0);
|
// test<double>(5.0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user