This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3 patch] Add std::tr1::shared_ptr
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: libstdc++ at gcc dot gnu dot org
- Date: Mon, 21 Feb 2005 11:12:51 -0600
- Subject: Re: [v3 patch] Add std::tr1::shared_ptr
- Organization: Red Hat / Chicago
- References: <20050221131605.GA37622@compsoc.man.ac.uk>
This looks great Jonathan.
> There are no tests for weak_ptr and incomplete tests for shared_ptr,
> I'll add them eventually but don't have enough time to do it right now.
Sounds acceptable to me. FYI, you shouldn't need to key off of __EXCEPTIONS in the individual testsuite files.
All you need to do is make sure -fno-exceptions compiles cleanly. (It
looks like you've tested this. Am I correct?)
> I have modified the relevant Boost tests to use the std::tr1::shared_ptr
> instead of boost::shared_ptr and run them successfully, but only on a
> single processor machine. The threaded tests should be run on as many
> exotic multiprocessor machines as possible, as one of the major changes
> I made to the classes was to use GCC's atomic ops instead of the
> Boost.Threads library. I can't commit those tests but I'll make them
> available to those who want them.
Can you post them after you check this in?
> For the shared_ptr_timing_test my modified versions did better without
> optimisation, but worse when optimisation was enabled. I plan to
> investigate that at some point. It might be because the Boost.Threads
> locks can be inlined whereas GCC's atomic ops will make a function call.
That would be interesting to figure out.
> I expect there will be plenty of changes to come but this should
> probably be committed now and improved later. OK for mainline?
Sounds like a great plan. Please check this in to mainline.
best,
benjamin