Commit 05a4261b by Jonathan Wakely Committed by Jonathan Wakely

unique_ptr.h (make_unique): Declare inline.

	* include/bits/unique_ptr.h (make_unique): Declare inline.
	(unique_ptr<T[],D>::reset()): Combine two overloads into one.
	(default_delete, unique_ptr): Add doxygen comments.
	* include/bits/shared_ptr_base.h: Improve doxygen comments.
	* include/bits/shared_ptr.h: Likewise.
	* testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line
	number.
	* testsuite/20_util/unique_ptr/assign/48635_neg.cc: Likewise.

From-SVN: r199069
parent 82ec8686
2013-05-18 Jonathan Wakely <jwakely.gcc@gmail.com>
* include/bits/unique_ptr.h (make_unique): Declare inline.
(unique_ptr<T[],D>::reset()): Combine two overloads into one.
(default_delete, unique_ptr): Add doxygen comments.
* include/bits/shared_ptr_base.h: Improve doxygen comments.
* include/bits/shared_ptr.h: Likewise.
* testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line
number.
* testsuite/20_util/unique_ptr/assign/48635_neg.cc: Likewise.
2013-05-18 Jonathan Wakely <jwakely.gcc@gmail.com>
* doc/xml/manual/status_cxx2011.xml: Fix markup error.
2013-05-18 Jonathan Wakely <jwakely.gcc@gmail.com>
* doc/xml/manual/status_cxx2011.xml: Fix markup error.
2013-05-18 Jonathan Wakely <jwakely.gcc@gmail.com>
......
......@@ -60,7 +60,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* @{
*/
/// 2.2.3.7 shared_ptr I/O
/// 20.7.2.2.11 shared_ptr I/O
template<typename _Ch, typename _Tr, typename _Tp, _Lock_policy _Lp>
inline std::basic_ostream<_Ch, _Tr>&
operator<<(std::basic_ostream<_Ch, _Tr>& __os,
......@@ -70,7 +70,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return __os;
}
/// 2.2.3.10 shared_ptr get_deleter (experimental)
/// 20.7.2.2.10 shared_ptr get_deleter
template<typename _Del, typename _Tp, _Lock_policy _Lp>
inline _Del*
get_deleter(const __shared_ptr<_Tp, _Lp>& __p) noexcept
......
......@@ -1204,13 +1204,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: public _Sp_less<__shared_ptr<_Tp, _Lp>>
{ };
// 2.2.3.8 shared_ptr specialized algorithms.
// 20.7.2.2.8 shared_ptr specialized algorithms.
template<typename _Tp, _Lock_policy _Lp>
inline void
swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b) noexcept
{ __a.swap(__b); }
// 2.2.3.9 shared_ptr casts
// 20.7.2.2.9 shared_ptr casts
// The seemingly equivalent code:
// shared_ptr<_Tp, _Lp>(static_cast<_Tp*>(__r.get()))
......
......@@ -27,4 +27,4 @@ struct D : B { };
D d;
std::default_delete<B[]> db;
typedef decltype(db(&d)) type; // { dg-error "use of deleted function" }
// { dg-error "declared here" "" { target *-*-* } 104 }
// { dg-error "declared here" "" { target *-*-* } 122 }
......@@ -41,10 +41,10 @@ void f()
std::unique_ptr<int, B&> ub(nullptr, b);
std::unique_ptr<int, D&> ud(nullptr, d);
ub = std::move(ud);
// { dg-error "use of deleted function" "" { target *-*-* } 206 }
// { dg-error "use of deleted function" "" { target *-*-* } 270 }
std::unique_ptr<int[], B&> uba(nullptr, b);
std::unique_ptr<int[], D&> uda(nullptr, d);
uba = std::move(uda);
// { dg-error "use of deleted function" "" { target *-*-* } 396 }
// { dg-error "use of deleted function" "" { target *-*-* } 515 }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment