Commit c1510a49 by Paolo Carlini Committed by Paolo Carlini

shared_ptr_base.h: Remove a few now redundant __glibcxx_function_requires(_ConvertibleConcept...).

2010-08-10  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/shared_ptr_base.h: Remove a few now redundant
	__glibcxx_function_requires(_ConvertibleConcept...).
	* testsuite/20_util/shared_ptr/cons/43820.cc: Adjust dg-error
	line number.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Likewise.

From-SVN: r163075
parent da4dbc25
2010-08-10 Paolo Carlini <paolo.carlini@oracle.com> 2010-08-10 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/shared_ptr_base.h: Remove a few now redundant
__glibcxx_function_requires(_ConvertibleConcept...).
* testsuite/20_util/shared_ptr/cons/43820.cc: Adjust dg-error
line number.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Likewise.
2010-08-10 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/ext/stdio_sync_filebuf/char/1.cc: Avoid -Wall * testsuite/ext/stdio_sync_filebuf/char/1.cc: Avoid -Wall
warnings. warnings.
* testsuite/ext/stdio_sync_filebuf/wchar_t/1.cc: Likewise. * testsuite/ext/stdio_sync_filebuf/wchar_t/1.cc: Likewise.
......
...@@ -605,7 +605,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -605,7 +605,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type> std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
__shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r) __shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r)
: _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws
{ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>) } { }
__shared_ptr(__shared_ptr&& __r) __shared_ptr(__shared_ptr&& __r)
: _M_ptr(__r._M_ptr), _M_refcount() // never throws : _M_ptr(__r._M_ptr), _M_refcount() // never throws
...@@ -619,7 +619,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -619,7 +619,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__shared_ptr(__shared_ptr<_Tp1, _Lp>&& __r) __shared_ptr(__shared_ptr<_Tp1, _Lp>&& __r)
: _M_ptr(__r._M_ptr), _M_refcount() // never throws : _M_ptr(__r._M_ptr), _M_refcount() // never throws
{ {
__glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
_M_refcount._M_swap(__r._M_refcount); _M_refcount._M_swap(__r._M_refcount);
__r._M_ptr = 0; __r._M_ptr = 0;
} }
...@@ -971,16 +970,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -971,16 +970,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type> std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
__weak_ptr(const __weak_ptr<_Tp1, _Lp>& __r) __weak_ptr(const __weak_ptr<_Tp1, _Lp>& __r)
: _M_refcount(__r._M_refcount) // never throws : _M_refcount(__r._M_refcount) // never throws
{ { _M_ptr = __r.lock().get(); }
__glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
_M_ptr = __r.lock().get();
}
template<typename _Tp1, typename = typename template<typename _Tp1, typename = typename
std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type> std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
__weak_ptr(const __shared_ptr<_Tp1, _Lp>& __r) __weak_ptr(const __shared_ptr<_Tp1, _Lp>& __r)
: _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws
{ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>) } { }
template<typename _Tp1> template<typename _Tp1>
__weak_ptr& __weak_ptr&
......
...@@ -35,6 +35,6 @@ void test01() ...@@ -35,6 +35,6 @@ void test01()
// { dg-error "incomplete" "" { target *-*-* } 566 } // { dg-error "incomplete" "" { target *-*-* } 566 }
std::shared_ptr<X> p9(ap()); // { dg-error "here" } std::shared_ptr<X> p9(ap()); // { dg-error "here" }
// { dg-error "incomplete" "" { target *-*-* } 659 } // { dg-error "incomplete" "" { target *-*-* } 658 }
} }
...@@ -43,7 +43,7 @@ main() ...@@ -43,7 +43,7 @@ main()
// { dg-warning "note" "" { target *-*-* } 327 } // { dg-warning "note" "" { target *-*-* } 327 }
// { dg-warning "note" "" { target *-*-* } 446 } // { dg-warning "note" "" { target *-*-* } 446 }
// { dg-warning "note" "" { target *-*-* } 864 } // { dg-warning "note" "" { target *-*-* } 863 }
// { dg-warning "note" "" { target *-*-* } 580 } // { dg-warning "note" "" { target *-*-* } 580 }
// { dg-warning "note" "" { target *-*-* } 1027 } // { dg-warning "note" "" { target *-*-* } 1027 }
// { dg-warning "note" "" { target *-*-* } 340 } // { dg-warning "note" "" { target *-*-* } 340 }
......
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