[PATCH][GSoC] Extend shared_ptr to support arrays
Tim Shen
timshen@google.com
Fri Jun 12 06:43:00 GMT 2015
On Thu, Jun 11, 2015 at 8:32 AM, Fan You <youfan.noey@gmail.com> wrote:
> Hi,
>
> This is my first patch for GSoC project: extend shared_ptr to support
> arrays.
+ using element_type = _Tp[N];
using element_type = typename std::remove_extent_t<_Tp>; ?
> using _Deleter_type = typename conditional<is_array<_Tp>::value,
> _Normal_deleter, _Array_deleter>::type;
Sadly std::default_delete doesn't support _Tp[N]. It will also works
to create a std::default_delete-ish helper trait, with _Tp[N]
specialized to `delete []` as well.
--
Regards,
Tim Shen
More information about the Libstdc++
mailing list