This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH][GSoC] Extend shared_ptr to support arrays
- From: Fan You <youfan dot noey at gmail dot com>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: Tim Shen <timshen at google dot com>, "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Sun, 21 Jun 2015 16:34:15 +0800
- Subject: Re: [PATCH][GSoC] Extend shared_ptr to support arrays
- Authentication-results: sourceware.org; auth=none
- References: <CALvpekGQvTp2zRz65cnP+Ex7TKHQygdrYkqo5nUKGJ3bLQj8ww at mail dot gmail dot com> <CAG4ZjNkEPsJd4Crx1xtp4ZvJ-xFGJ5aaR8qb+A7aVMi++wKRtw at mail dot gmail dot com> <20150612090414 dot GP12728 at redhat dot com> <CALvpekG4+YxSVz+jm_quo20=2bWYXnkBFrjDyBu6eYXW4YarHQ at mail dot gmail dot com> <20150615093829 dot GA21485 at redhat dot com> <CALvpekE2a8qi8qRjdzsDOi2OCRJw_ccYd1CrL6z68rLFW0fK0g at mail dot gmail dot com> <20150616132839 dot GA13009 at redhat dot com>
Hi,
I forked gcc and added a new branch shared_arrays here
<https://github.com/Noeyfan/gcc-1/tree/shared_arrays>
Few tests regarding constructors, destructor, comparison and operators
had been added, bugs fixed and tests all passed. I haven't put them
into separate folder, but it will be done.
I also tried gcov and most of the __shared_ptr<__libfund> impl had
been tested thoroughly.
Fan
2015-06-16 21:28 GMT+08:00 Jonathan Wakely <jwakely@redhat.com>:
> On 16/06/15 21:15 +0800, Fan You wrote:
>>>
>>> You will also need to write new tests (under testsuite/experimental/)
>>> to check that your new code works as intended.
>>
>>
>>
>> Is there any pattern or rules I should follow when writing testcase, or I
>> can just refer to 20_util/* and add some array specified tests?
>
>
> Follow the style of the 20_util tests, but put the new ones under
> testsuite/experimental. Tim can help you with any questions about the
> testsuite, it doesn't need to be discussed on the gcc-patches list
> (since there's nothing ready to be committed yet anyway).
>
>>> I wonder if all the new code really needs to be in <bits/shared_ptr.h>
>>>
>>
>> why it need to be in <bits/shared_ptr.h>?
>
>
> It doesn't, that's what I mean.
>
> All the new code is only usable after including <experimental/memory>,
> but you have added lots of code to <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>.
>>>
>>>
>>>
>>>
>> So, what else should I do before its ready to be committed?
>
>
> Tests, tests and more tests.
>
> Currently you haven't got a single test, so I have no way of knowing
> if the code even does what it's supposed to do.
>
> Once you have written tests and they all pass then we can review the
> code again fully and get it ready to commit. We are not there yet.
>
> It might be a good idea to publish your changes somewhere visible, so
> that people who want to try your code can clone it and test it without
> having to apply patches. Are you using Git locally? If you have a
> github account you could fork https://github.com/gcc-mirror/gcc and
> then push your changes to a new branch in your fork.
>