[Bug libstdc++/36962] [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr

jwakely dot gcc at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed Jul 30 21:29:00 GMT 2008



------- 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



More information about the Gcc-bugs mailing list