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: [v3 PATCH] Support allocators in tuples of zero size.


On 5 June 2016 at 20:59, Ville Voutilainen <ville.voutilainen@gmail.com> wrote:
> All in all this is a bit inane, but the spec requires a zero-sized tuple
> to provide allocator overloads for constructors, even though they do
> absolutely nothing (they completely ignore the allocator). Presumably
> these are also useful for some metaprogrammers I haven't heard of.
> This takes us one small step further to pass libc++'s testsuite for tuple.
>
> Tested on Linux-X64.
>
> 2016-06-05  Ville Voutilainen  <ville.voutilainen@gmail.com>
>
>     Support allocators in tuples of zero size.
>     * include/std/tuple (tuple<>::tuple(),
>     tuple<>::tuple(allocator_arg_t, const _Alloc&),
>     tuple<>::tuple(allocator_arg_t, const _Alloc&, const tuple&),
>     tuple<>::tuple(allocator_arg_t, const _Alloc&, tuple&&)): New.
>     * testsuite/20_util/tuple/cons/allocators.cc: Adjust.

Uh, perhaps we shouldn't add a useless move constructor.

2016-06-05  Ville Voutilainen  <ville.voutilainen@gmail.com>

    Support allocators in tuples of zero size.
    * include/std/tuple (tuple<>::tuple(),
    tuple<>::tuple(allocator_arg_t, const _Alloc&),
    tuple<>::tuple(allocator_arg_t, const _Alloc&, const tuple&)): New.
    * testsuite/20_util/tuple/cons/allocators.cc: Adjust.

Attachment: zero-tuple-allocators_2.diff
Description: Text document


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