[PATCH][GSoC] Extend shared_ptr to support arrays
Jonathan Wakely
jwakely@redhat.com
Mon Jun 15 09:38:00 GMT 2015
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>.
More information about the Libstdc++
mailing list