summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/include/bits/shared_ptr_base.h
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-03 00:27:48 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-03 00:27:48 +0000
commitf1d5e53ebf4963d62a2b03b4f13e695edca679dd (patch)
treef1173ab656fbe2a4579047297db9a6d0fcea6a48 /libstdc++-v3/include/bits/shared_ptr_base.h
parentfa94af7a38a42c107c51fd9c56c2227cc542ef67 (diff)
downloadppe42-gcc-f1d5e53ebf4963d62a2b03b4f13e695edca679dd.tar.gz
ppe42-gcc-f1d5e53ebf4963d62a2b03b4f13e695edca679dd.zip
* include/std/memory: Include auto_ptr.h later.
* include/bits/shared_ptr.h (shared_ptr(auto_ptr<_Up>&&): Remove definition. * include/bits/shared_ptr_base.h (__shared_ptr(auto_ptr<_Up>&&): Likewise. * include/bits/unique_ptr.h (unique_ptr(auto_ptr<_Up>&&): Likewise. * include/backward/auto_ptr.h (unique_ptr(auto_ptr<_Up>&&): Define. (shared_ptr(auto_ptr<_Up>&&, __shared_ptr(auto_ptr<_Up>&&): Likewise. * include/std/future: Reduce header dependencies. * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line numbers. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Likewise. * testsuite/20_util/unique_ptr/assign/48635_neg.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190109 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/bits/shared_ptr_base.h')
-rw-r--r--libstdc++-v3/include/bits/shared_ptr_base.h21
1 files changed, 7 insertions, 14 deletions
diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h
index 39449f1b4bb..1ccd5ef3a56 100644
--- a/libstdc++-v3/include/bits/shared_ptr_base.h
+++ b/libstdc++-v3/include/bits/shared_ptr_base.h
@@ -1,7 +1,6 @@
// shared_ptr and weak_ptr implementation details -*- C++ -*-
-// Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
-// Free Software Foundation, Inc.
+// Copyright (C) 2007-2012 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -54,6 +53,10 @@ namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
+#if _GLIBCXX_USE_DEPRECATED
+ template<typename> class auto_ptr;
+#endif
+
/**
* @brief Exception possibly thrown by @c shared_ptr.
* @ingroup exceptions
@@ -537,9 +540,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// Special case for auto_ptr<_Tp> to provide the strong guarantee.
template<typename _Tp>
explicit
- __shared_count(std::auto_ptr<_Tp>&& __r)
- : _M_pi(new _Sp_counted_ptr<_Tp*, _Lp>(__r.get()))
- { __r.release(); }
+ __shared_count(std::auto_ptr<_Tp>&& __r);
#endif
// Special case for unique_ptr<_Tp,_Del> to provide the strong guarantee.
@@ -859,15 +860,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#if _GLIBCXX_USE_DEPRECATED
// Postcondition: use_count() == 1 and __r.get() == 0
template<typename _Tp1>
- __shared_ptr(std::auto_ptr<_Tp1>&& __r)
- : _M_ptr(__r.get()), _M_refcount()
- {
- __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
- static_assert( sizeof(_Tp1) > 0, "incomplete type" );
- _Tp1* __tmp = __r.get();
- _M_refcount = __shared_count<_Lp>(std::move(__r));
- __enable_shared_from_this_helper(_M_refcount, __tmp, __tmp);
- }
+ __shared_ptr(std::auto_ptr<_Tp1>&& __r);
#endif
/* TODO: use delegating constructor */
OpenPOWER on IntegriCloud