Message ID | 1325618257-2435-1-git-send-email-chase.douglas@canonical.com |
---|---|
State | New |
Headers | show |
On 3 January 2012 19:17, Chase Douglas wrote: > > PR c++/50500 > * include/bits/shared_ptr.h: Add lazy copy ops even if there's a move That is the ChangeLog for the front-end part of 50500, isn't it? Should be something like "Default copy ctor and assignment." Otherwise this is OK to check in, thanks. (Do you need me to do the actual check in or can Matthias do it?)
On 01/03/2012 12:34 PM, Jonathan Wakely wrote: > On 3 January 2012 19:17, Chase Douglas wrote: >> >> PR c++/50500 >> * include/bits/shared_ptr.h: Add lazy copy ops even if there's a move > > That is the ChangeLog for the front-end part of 50500, isn't it? > Should be something like "Default copy ctor and assignment." I just copied the changelog text from commit 180159. That was the suggested approach in the style guidelines, though I do agree that "Default copy ctor and assignment" makes more sense. What do you suggest I do? > Otherwise this is OK to check in, thanks. > > (Do you need me to do the actual check in or can Matthias do it?) I don't know if Matthias can do it. I copied him to keep him in the loop since he is the toolchain maintainer for Ubuntu and I would like to get this into the next release. If you have access, I would suggest you do it since Matthias hasn't been involved in the generation or review of this patch. Thanks! -- Chase
On 3 January 2012 20:45, Chase Douglas wrote: > On 01/03/2012 12:34 PM, Jonathan Wakely wrote: >> On 3 January 2012 19:17, Chase Douglas wrote: >>> >>> PR c++/50500 >>> * include/bits/shared_ptr.h: Add lazy copy ops even if there's a move >> >> That is the ChangeLog for the front-end part of 50500, isn't it? >> Should be something like "Default copy ctor and assignment." > > I just copied the changelog text from commit 180159. That was the > suggested approach in the style guidelines, though I do agree that > "Default copy ctor and assignment" makes more sense. What do you suggest > I do? Use the text from the libstdc++-v3/ChangeLog for the shared_prt.h change: http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/ChangeLog?r1=180159&r2=180158&pathrev=180159 You can look in libstdc++-v3/ChangeLog to find that too. Jason's commit message was the text from gcc/cp/ChangeLog, but he touched several parts (the C++ front-end, the C++ library and the testsuite) which all have their own ChangeLog files. >> Otherwise this is OK to check in, thanks. >> >> (Do you need me to do the actual check in or can Matthias do it?) > > I don't know if Matthias can do it. I copied him to keep him in the loop > since he is the toolchain maintainer for Ubuntu and I would like to get > this into the next release. If you have access, I would suggest you do > it since Matthias hasn't been involved in the generation or review of > this patch. OK, I'll do it. Thanks.
--- a/src/libstdc++-v3/include/bits/shared_ptr.h (revision 180158) +++ b/src/libstdc++-v3/include/bits/shared_ptr.h (revision 180159) @@ -211,6 +211,7 @@ * @param __r A %shared_ptr. * @post get() == __r.get() && use_count() == __r.use_count() */ + shared_ptr(const shared_ptr&) = default; // never throws template<typename _Tp1, typename = typename std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type> shared_ptr(const shared_ptr<_Tp1>& __r) @@ -264,6 +265,7 @@ constexpr shared_ptr(nullptr_t __p) : __shared_ptr<_Tp>(__p) { } + shared_ptr& operator=(const shared_ptr&) = default; template<typename _Tp1> shared_ptr& operator=(const shared_ptr<_Tp1>& __r) // never throws --- a/src/libstdc++-v3/include/bits/shared_ptr_base.h 2011/03/22 15:15:03 171293 +++ b/src/libstdc++-v3/include/bits/shared_ptr_base.h 2011/05/18 22:59:17 173882 @@ -799,7 +801,8 @@ : _M_ptr(__p), _M_refcount(__r._M_refcount) // never throws { } - // generated copy constructor, assignment, destructor are fine. + __shared_ptr(const __shared_ptr&) = default; // never throws + __shared_ptr& operator=(const __shared_ptr&) = default; // never throws template<typename _Tp1, typename = typename std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type> @@ -1216,7 +1220,8 @@ : _M_ptr(0), _M_refcount() // never throws { } - // Generated copy constructor, assignment, destructor are fine. + __weak_ptr(const __weak_ptr&) = default; // never throws + __weak_ptr& operator=(const __weak_ptr&) = default; // never throws // The "obvious" converting constructor implementation: //