[patch] Fix libstdc++/36962

Chris Fairles chris.fairles@gmail.com
Thu Sep 4 22:28:00 GMT 2008


On Thu, Sep 4, 2008 at 6:13 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> this patch is attached to http://gcc.gnu.org/PR36962 and could do with
> review by more eyeballs
>
>        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.
>
> Tested x86_64-unknown-linux-gnu
>
> It only affects C++0x and TR1 code, mostly just moving stuff between
> headers, but also updates the C++0x version in line with the current
> draft.
>
> Jonathan
>

No big deal, but I noticed that _Sp_* classes use private ctor/cctor
as opposed to deleted ctor/cctor. Obviously not a requirement for
internal classes but the feature's there, might as well use it :)

Chris



More information about the Libstdc++ mailing list