public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/36962] [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr
  2008-07-29  9:24 [Bug libstdc++/36962] New: [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr paolo dot carlini at oracle dot com
@ 2008-07-29  9:24 ` paolo dot carlini at oracle dot com
  2008-07-29 19:25 ` jwakely dot gcc at gmail dot com
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-07-29  9:24 UTC (permalink / raw)
  To: gcc-bugs



-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-07-29 09:23:29
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36962


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug libstdc++/36962]  New: [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr
@ 2008-07-29  9:24 paolo dot carlini at oracle dot com
  2008-07-29  9:24 ` [Bug libstdc++/36962] " paolo dot carlini at oracle dot com
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-07-29  9:24 UTC (permalink / raw)
  To: gcc-bugs

Just an internal reminder. Note that by now deleted functions are also
available!

Jonathan, are you planning to work on this any time soon?


-- 
           Summary: [C++0x] Add constructors / assignment operators from
                    unique_ptr to shared_ptr
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: paolo dot carlini at oracle dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36962


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug libstdc++/36962] [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr
  2008-07-29  9:24 [Bug libstdc++/36962] New: [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr paolo dot carlini at oracle dot com
  2008-07-29  9:24 ` [Bug libstdc++/36962] " paolo dot carlini at oracle dot com
@ 2008-07-29 19:25 ` jwakely dot gcc at gmail dot com
  2008-07-29 19:28 ` paolo dot carlini at oracle dot com
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: jwakely dot gcc at gmail dot com @ 2008-07-29 19:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jwakely dot gcc at gmail dot com  2008-07-29 19:24 -------
I will try to look at it next week some time, but don't have much spare time in
the near future, so don't hold your breath for me to do it.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36962


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug libstdc++/36962] [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr
  2008-07-29  9:24 [Bug libstdc++/36962] New: [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr paolo dot carlini at oracle dot com
  2008-07-29  9:24 ` [Bug libstdc++/36962] " paolo dot carlini at oracle dot com
  2008-07-29 19:25 ` jwakely dot gcc at gmail dot com
@ 2008-07-29 19:28 ` paolo dot carlini at oracle dot com
  2008-07-30 21:29 ` jwakely dot gcc at gmail dot com
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-07-29 19:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from paolo dot carlini at oracle dot com  2008-07-29 19:28 -------
Ok, Jonathan. You are the share_ptr expert here, I'll wait for you until, say,
middle of August, then will go ahead myself, it seems a small task.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36962


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug libstdc++/36962] [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr
  2008-07-29  9:24 [Bug libstdc++/36962] New: [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr paolo dot carlini at oracle dot com
                   ` (2 preceding siblings ...)
  2008-07-29 19:28 ` paolo dot carlini at oracle dot com
@ 2008-07-30 21:29 ` jwakely dot gcc at gmail dot com
  2008-07-30 21:50 ` paolo dot carlini at oracle dot com
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: jwakely dot gcc at gmail dot com @ 2008-07-30 21:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jwakely dot gcc at gmail dot com  2008-07-30 21:27 -------
Created an attachment (id=15979)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15979&action=view)
unique_ptr and rvalue-reference updates from WP

I'm going to be offline until next week so here's what I have so far.
This adds the rvalue-references and unique_ptr changes from 20.7.12.2 in the
current WP, n2691, but I might have missed something.

While adding the new swap() overloads I realised we need to specialize swap()
for shared_ptr as well as __shared_ptr, because a user can detect the
difference by taking the address or explicitly specifying the template
parameters (the __shared_ptr overloads have an extra template param for the
lock policy.)

tested linux x86_64


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36962


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug libstdc++/36962] [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr
  2008-07-29  9:24 [Bug libstdc++/36962] New: [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr paolo dot carlini at oracle dot com
                   ` (3 preceding siblings ...)
  2008-07-30 21:29 ` jwakely dot gcc at gmail dot com
@ 2008-07-30 21:50 ` paolo dot carlini at oracle dot com
  2008-07-31  9:00 ` paolo dot carlini at oracle dot com
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-07-30 21:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from paolo dot carlini at oracle dot com  2008-07-30 21:49 -------
Many thanks Jonathan! By the time you will be back online, my comments will be
ready and in any case will be able to commit the changes! Thanks again, Paolo.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36962


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug libstdc++/36962] [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr
  2008-07-29  9:24 [Bug libstdc++/36962] New: [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr paolo dot carlini at oracle dot com
                   ` (4 preceding siblings ...)
  2008-07-30 21:50 ` paolo dot carlini at oracle dot com
@ 2008-07-31  9:00 ` paolo dot carlini at oracle dot com
  2008-07-31 11:04 ` paolo dot carlini at oracle dot com
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-07-31  9:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from paolo dot carlini at oracle dot com  2008-07-31 08:59 -------
Hi again. I have essentially only one substantive comment: can you double check
the implementation is correct vs 20.7.12.2.1/37 ?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36962


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug libstdc++/36962] [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr
  2008-07-29  9:24 [Bug libstdc++/36962] New: [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr paolo dot carlini at oracle dot com
                   ` (5 preceding siblings ...)
  2008-07-31  9:00 ` paolo dot carlini at oracle dot com
@ 2008-07-31 11:04 ` paolo dot carlini at oracle dot com
  2008-08-05 19:07 ` jwakely dot gcc at gmail dot com
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-07-31 11:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from paolo dot carlini at oracle dot com  2008-07-31 11:03 -------
By the way, I'm under the impression that the differences between the TR1 and
the C++0x versions are by now too many, way too many macros. At some point we
should byte the bullet and separate completely for a great clean-up! (I did
that for tuple, for instance, and it paid off immediately in the occasion of
the int -> size_t change, more changes to the constructors are expected...)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36962


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug libstdc++/36962] [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr
  2008-07-29  9:24 [Bug libstdc++/36962] New: [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr paolo dot carlini at oracle dot com
                   ` (6 preceding siblings ...)
  2008-07-31 11:04 ` paolo dot carlini at oracle dot com
@ 2008-08-05 19:07 ` jwakely dot gcc at gmail dot com
  2008-08-05 19:27 ` paolo dot carlini at oracle dot com
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: jwakely dot gcc at gmail dot com @ 2008-08-05 19:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jwakely dot gcc at gmail dot com  2008-08-05 19:06 -------
(In reply to comment #5)
> Hi again. I have essentially only one substantive comment: can you double check
> the implementation is correct vs 20.7.12.2.1/37 ?

I believe the use of std::ref was to make the D parameter CopyConstructible, as
required by shared_ptr.  Since the deleter is stored in the non-copyable
_Sp_counted_deleter class, I thought our implementation was already "equivalent
to" those effects.

On further reflection, I realised the user will be able to tell the difference
via get_deleter() so I will change it to use std::ref.

(In reply to comment #6)
> By the way, I'm under the impression that the differences between the TR1 and
> the C++0x versions are by now too many, way too many macros. At some point we
> should byte the bullet and separate completely for a great clean-up! (I did
> that for tuple, for instance, and it paid off immediately in the occasion of
> the int -> size_t change, more changes to the constructors are expected...)

Agreed - I'll do this too.

Assign this to me if you want - I don't have the bugzilla privileges to accept
it myself.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36962


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug libstdc++/36962] [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr
  2008-07-29  9:24 [Bug libstdc++/36962] New: [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr paolo dot carlini at oracle dot com
                   ` (7 preceding siblings ...)
  2008-08-05 19:07 ` jwakely dot gcc at gmail dot com
@ 2008-08-05 19:27 ` paolo dot carlini at oracle dot com
  2008-09-03 15:02 ` jwakely dot gcc at gmail dot com
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-08-05 19:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from paolo dot carlini at oracle dot com  2008-08-05 19:26 -------
Excellent. Thanks a lot again, Jonathan.


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|jwakely dot gcc at gmail dot|
                   |com                         |
         AssignedTo|unassigned at gcc dot gnu   |jwakely dot gcc at gmail dot
                   |dot org                     |com
             Status|NEW                         |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36962


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug libstdc++/36962] [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr
  2008-07-29  9:24 [Bug libstdc++/36962] New: [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr paolo dot carlini at oracle dot com
                   ` (8 preceding siblings ...)
  2008-08-05 19:27 ` paolo dot carlini at oracle dot com
@ 2008-09-03 15:02 ` jwakely dot gcc at gmail dot com
  2008-09-03 15:06 ` paolo dot carlini at oracle dot com
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: jwakely dot gcc at gmail dot com @ 2008-09-03 15:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jwakely dot gcc at gmail dot com  2008-09-03 15:00 -------
I have another patch ready for this, but it doesn't work with unique_ptr<T,D>
where D is a reference type, due to Bug 37351 

e.g. constructing from unique_ptr<T,default_deleter<T>&> fails to compile
because std::reference_wrapper<std::default_deleter<T>>::operator()(T*) cannot
be instantiated.

I can submit the patch anyway with an XFAIL testcase until std::result_of is
fixed.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36962


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug libstdc++/36962] [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr
  2008-07-29  9:24 [Bug libstdc++/36962] New: [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr paolo dot carlini at oracle dot com
                   ` (9 preceding siblings ...)
  2008-09-03 15:02 ` jwakely dot gcc at gmail dot com
@ 2008-09-03 15:06 ` paolo dot carlini at oracle dot com
  2008-09-03 15:10 ` jwakely dot gcc at gmail dot com
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-09-03 15:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from paolo dot carlini at oracle dot com  2008-09-03 15:04 -------
Sure, no problem. Let's just do the split and implement as much as the
unique_ptr changes as possible. If then updating result_of for C++0x is enough,
everything is perfectly fine.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36962


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug libstdc++/36962] [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr
  2008-07-29  9:24 [Bug libstdc++/36962] New: [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr paolo dot carlini at oracle dot com
                   ` (10 preceding siblings ...)
  2008-09-03 15:06 ` paolo dot carlini at oracle dot com
@ 2008-09-03 15:10 ` jwakely dot gcc at gmail dot com
  2008-09-03 23:44 ` jwakely dot gcc at gmail dot com
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: jwakely dot gcc at gmail dot com @ 2008-09-03 15:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from jwakely dot gcc at gmail dot com  2008-09-03 15:08 -------
Yes, the problem is with result_of, not my changes to shared_ptr.  It will work
with unique_ptr<T,D&> if a type D::result_type exists, so I'll submit the new
patch tonight.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36962


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug libstdc++/36962] [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr
  2008-07-29  9:24 [Bug libstdc++/36962] New: [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr paolo dot carlini at oracle dot com
                   ` (11 preceding siblings ...)
  2008-09-03 15:10 ` jwakely dot gcc at gmail dot com
@ 2008-09-03 23:44 ` jwakely dot gcc at gmail dot com
  2008-09-04  1:12 ` paolo dot carlini at oracle dot com
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: jwakely dot gcc at gmail dot com @ 2008-09-03 23:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from jwakely dot gcc at gmail dot com  2008-09-03 23:43 -------
Created an attachment (id=16216)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16216&action=view)
updated patch

this replaces tr1_impl/boost_shared_ptr.h with separate files in tr1/ and bits/
as well as implementing all the rvalue-reference and unique_ptr bits from n2723

The section numbers in bits/boost_shared_ptr.h refer to TR1 not the WP, and
some of the shared_ptr tests still refer to the old 20.6.6.* numbers for
shared_ptr. I'll update these another time so it's easier to diff the new file
with the old tr1_impl one, and because the numbers might change again before
the standard is finished.


-- 

jwakely dot gcc at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #15979|0                           |1
        is obsolete|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36962


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug libstdc++/36962] [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr
  2008-07-29  9:24 [Bug libstdc++/36962] New: [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr paolo dot carlini at oracle dot com
                   ` (12 preceding siblings ...)
  2008-09-03 23:44 ` jwakely dot gcc at gmail dot com
@ 2008-09-04  1:12 ` paolo dot carlini at oracle dot com
  2008-09-04  9:14 ` paolo dot carlini at oracle dot com
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-09-04  1:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from paolo dot carlini at oracle dot com  2008-09-04 01:11 -------
Great Jonathan. Tomorrow I'll regtest it again on machines and likely commit
it.

Well, consider also posting the patch to the mailing list...


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36962


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug libstdc++/36962] [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr
  2008-07-29  9:24 [Bug libstdc++/36962] New: [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr paolo dot carlini at oracle dot com
                   ` (13 preceding siblings ...)
  2008-09-04  1:12 ` paolo dot carlini at oracle dot com
@ 2008-09-04  9:14 ` paolo dot carlini at oracle dot com
  2008-09-04 13:54 ` jwakely dot gcc at gmail dot com
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-09-04  9:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from paolo dot carlini at oracle dot com  2008-09-04 09:12 -------
Jonathan, while we are at it, can we also unify tr1/boost_sp_shared_count.h and
tr1/boost_shared_ptr.h, likewise for bits/boost_sp_shared_count.h and
bits/boost_shared_ptr.h?

Moreover, for the sake of clarity, we could as well complete the split and
duplicate tr1_impl/boost_sp_counted_base.h. 

Finally, with all due respect, all those boost_* prefixes in the names, given
the proper copyrights that we have in the files, seem redundant to me.

Can you work on the above? Just let me know, I can try to find the time...


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36962


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug libstdc++/36962] [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr
  2008-07-29  9:24 [Bug libstdc++/36962] New: [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr paolo dot carlini at oracle dot com
                   ` (14 preceding siblings ...)
  2008-09-04  9:14 ` paolo dot carlini at oracle dot com
@ 2008-09-04 13:54 ` jwakely dot gcc at gmail dot com
  2008-09-04 14:01 ` paolo dot carlini at oracle dot com
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: jwakely dot gcc at gmail dot com @ 2008-09-04 13:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from jwakely dot gcc at gmail dot com  2008-09-04 13:52 -------
Sure, I can do that


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36962


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug libstdc++/36962] [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr
  2008-07-29  9:24 [Bug libstdc++/36962] New: [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr paolo dot carlini at oracle dot com
                   ` (15 preceding siblings ...)
  2008-09-04 13:54 ` jwakely dot gcc at gmail dot com
@ 2008-09-04 14:01 ` paolo dot carlini at oracle dot com
  2008-09-04 21:40 ` jwakely dot gcc at gmail dot com
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-09-04 14:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from paolo dot carlini at oracle dot com  2008-09-04 14:00 -------
Great, thanks a lot again.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36962


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug libstdc++/36962] [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr
  2008-07-29  9:24 [Bug libstdc++/36962] New: [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr paolo dot carlini at oracle dot com
                   ` (16 preceding siblings ...)
  2008-09-04 14:01 ` paolo dot carlini at oracle dot com
@ 2008-09-04 21:40 ` jwakely dot gcc at gmail dot com
  2008-09-04 22:35 ` redi at gcc dot gnu dot org
  2008-09-04 22:41 ` jwakely dot gcc at gmail dot com
  19 siblings, 0 replies; 21+ messages in thread
From: jwakely dot gcc at gmail dot com @ 2008-09-04 21:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from jwakely dot gcc at gmail dot com  2008-09-04 21:39 -------
Created an attachment (id=16226)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16226&action=view)
new patch

As requested, except I didn't split tr1_impl/boost_sp_counted_base.h

My preference would be to leave that file alone and common to both versions, it
doesn't use variadic templates or rvalue-references and is probably the most
stable part of shared_ptr, as well as the trickiest to get right :)

I'm waiting for the testsuite to finish then I'll send this to the list too.


-- 

jwakely dot gcc at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #16216|0                           |1
        is obsolete|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36962


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug libstdc++/36962] [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr
  2008-07-29  9:24 [Bug libstdc++/36962] New: [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr paolo dot carlini at oracle dot com
                   ` (17 preceding siblings ...)
  2008-09-04 21:40 ` jwakely dot gcc at gmail dot com
@ 2008-09-04 22:35 ` redi at gcc dot gnu dot org
  2008-09-04 22:41 ` jwakely dot gcc at gmail dot com
  19 siblings, 0 replies; 21+ messages in thread
From: redi at gcc dot gnu dot org @ 2008-09-04 22:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from redi at gcc dot gnu dot org  2008-09-04 22:34 -------
Subject: Bug 36962

Author: redi
Date: Thu Sep  4 22:33:10 2008
New Revision: 140012

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140012
Log:
        PR libstdc++/36962
        * include/Makefile.am: Update headers.
        * include/Makefile.in: Regenerate.
        * include/std/memory: Update headers.
        * include/tr1/memory: Likewise.
        * include/tr1_impl/boost_shared_ptr.h: Remove, splitting into
        separate implementations for std and tr1.
        * include/bits/boost_sp_shared_count.h: Remove.
        * include/tr1/boost_sp_shared_count.h: Remove.
        * include/bits/shared_ptr.h: New. Combines boost_sp_shared_count.h
        and boost_shared_ptr.h into one file.
        (__shared_count,__shared_ptr,shared_ptr,swap): Add unique_ptr
        and rvalue-reference support as per current WP.
        * include/tr1/shared_ptr.h: New. Combines boost_sp_shared_count.h
        and boost_shared_ptr.h into one file.
        * testsuite/20_util/shared_ptr/cons/unique_ptr.cc: New.
        * testsuite/20_util/shared_ptr/cons/unique_ptr_deleter.cc: New.
        * testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref.cc: New.
        * testsuite/20_util/shared_ptr/cons/unique_ptr_neg.cc: New.
        * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue.cc: New.
        * testsuite/20_util/shared_ptr/assign/unique_ptr_lvalue_neg.cc: New.
        * testsuite/20_util/shared_ptr/assign/unique_ptr_rvalue.cc: New.
        * testsuite/20_util/shared_ptr/modifiers/swap_rvalue.cc: New.
        * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Remove.

Added:
    trunk/libstdc++-v3/include/bits/shared_ptr.h
    trunk/libstdc++-v3/include/tr1/shared_ptr.h
    trunk/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue.cc
   
trunk/libstdc++-v3/testsuite/20_util/shared_ptr/assign/unique_ptr_lvalue_neg.cc
    trunk/libstdc++-v3/testsuite/20_util/shared_ptr/assign/unique_ptr_rvalue.cc
    trunk/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr.cc
    trunk/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr_deleter.cc
   
trunk/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref.cc
    trunk/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr_neg.cc
    trunk/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/swap_rvalue.cc
Removed:
    trunk/libstdc++-v3/include/bits/boost_sp_shared_count.h
    trunk/libstdc++-v3/include/tr1/boost_sp_shared_count.h
    trunk/libstdc++-v3/include/tr1_impl/boost_shared_ptr.h
   
trunk/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/Makefile.am
    trunk/libstdc++-v3/include/Makefile.in
    trunk/libstdc++-v3/include/std/memory
    trunk/libstdc++-v3/include/tr1/memory


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36962


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug libstdc++/36962] [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr
  2008-07-29  9:24 [Bug libstdc++/36962] New: [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr paolo dot carlini at oracle dot com
                   ` (18 preceding siblings ...)
  2008-09-04 22:35 ` redi at gcc dot gnu dot org
@ 2008-09-04 22:41 ` jwakely dot gcc at gmail dot com
  19 siblings, 0 replies; 21+ messages in thread
From: jwakely dot gcc at gmail dot com @ 2008-09-04 22:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #19 from jwakely dot gcc at gmail dot com  2008-09-04 22:40 -------
fixed for 4.4


-- 

jwakely dot gcc at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36962


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2008-09-04 22:41 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-29  9:24 [Bug libstdc++/36962] New: [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr paolo dot carlini at oracle dot com
2008-07-29  9:24 ` [Bug libstdc++/36962] " paolo dot carlini at oracle dot com
2008-07-29 19:25 ` jwakely dot gcc at gmail dot com
2008-07-29 19:28 ` paolo dot carlini at oracle dot com
2008-07-30 21:29 ` jwakely dot gcc at gmail dot com
2008-07-30 21:50 ` paolo dot carlini at oracle dot com
2008-07-31  9:00 ` paolo dot carlini at oracle dot com
2008-07-31 11:04 ` paolo dot carlini at oracle dot com
2008-08-05 19:07 ` jwakely dot gcc at gmail dot com
2008-08-05 19:27 ` paolo dot carlini at oracle dot com
2008-09-03 15:02 ` jwakely dot gcc at gmail dot com
2008-09-03 15:06 ` paolo dot carlini at oracle dot com
2008-09-03 15:10 ` jwakely dot gcc at gmail dot com
2008-09-03 23:44 ` jwakely dot gcc at gmail dot com
2008-09-04  1:12 ` paolo dot carlini at oracle dot com
2008-09-04  9:14 ` paolo dot carlini at oracle dot com
2008-09-04 13:54 ` jwakely dot gcc at gmail dot com
2008-09-04 14:01 ` paolo dot carlini at oracle dot com
2008-09-04 21:40 ` jwakely dot gcc at gmail dot com
2008-09-04 22:35 ` redi at gcc dot gnu dot org
2008-09-04 22:41 ` jwakely dot gcc at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).