This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [v3 PATCH] Support allocators in tuples of zero size.
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Ville Voutilainen <ville dot voutilainen at gmail dot com>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 6 Jun 2016 17:11:38 +0100
- Subject: Re: [v3 PATCH] Support allocators in tuples of zero size.
- Authentication-results: sourceware.org; auth=none
- References: <CAFk2RUZ3C9STb+u6K2gsjphnAC_042QTeKbe_emjTkzcULgvtA at mail dot gmail dot com> <CAFk2RUZJVkONk+o=ickt5PDb76ZJheP+W=PhDnMQg2fph7ZdyQ at mail dot gmail dot com>
On 05/06/16 21:15 +0300, Ville Voutilainen wrote:
{
public:
void swap(tuple&) noexcept { /* no-op */ }
+ // We need the default since we're going to define no-op
+ // allocator constructors.
+ tuple() = default;
+ // No-op allocator constructors.
+ template<typename _Alloc>
+ tuple(allocator_arg_t __tag, const _Alloc& __a) { }
+ template<typename _Alloc>
+ tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) { }
Please remove the names of the unused parameters, so we don't get
warnings with -Wsystem-headers -Wunused-parameter.
OK with that change, thanks.