This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][GSoC] Extend shared_ptr to support arrays


On 14/06/15 23:45 +0800, Fan You wrote:
This is the revised patch.

Bootstrapped and Tested on Darwin 10.9.4. with testsuite 20_util/*

Great, it's *very* important that you can run the tests, so we know
your changes haven't broken the existing code.

You will also need to write new tests (under testsuite/experimental/)
to check that your new code works as intended.

Tim also advice to do this:

__shared_ptr<libfund<_Tp>> : private __shared_ptr<std::remove_extent<_Tp>>

to prevent changing everything once __shared_ptr<_Tp> has changed.

Yes, that probably makes sense.

This patch is looking much better now.

I noticed this macro is wrong:

+#define __cpp_lib_experimental_shared_ptr_array 201506

The correct name and value are given in
https://rawgit.com/cplusplus/fundamentals-ts/v1/fundamentals-ts.html#general.feature.test


I wonder if all the new code really needs to be in <bits/shared_ptr.h>
or if it can just be in <experimental/memory> instead. There should be
no need to declare most of it (except maybe the enable_shared_from_this
parts?) when users include <memory>.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]