[v3 PATCH] Protect allocator-overloads of tuple-from-tuple constructors from cases that would create dangling references.
Ville Voutilainen
ville.voutilainen@gmail.com
Sun May 29 14:42:00 GMT 2016
On 28 May 2016 at 21:25, Ville Voutilainen <ville.voutilainen@gmail.com> wrote:
> The fix to avoid binding dangling references to temporaries for tuple's
> constructors that take tuples of different type didn't include the fix
> for allocator overloads. That was just lazy, and I should feel ashamed.
> This patch fixes it, and takes us one step further to pass libc++'s testsuite
> for tuple. The added _NonNestedTuple checks could actually be folded
> into the recently-added _TMCT alias, but I'll do that as a separate cleanup
> patch. For now, this should do as an easy and straightforward fix.
>
> Tested on Linux-x64.
>
> 2016-05-28 Ville Voutilainen <ville.voutilainen@gmail.com>
>
> Protect allocator-overloads of tuple-from-tuple constructors
> from cases that would create dangling references.
> * include/std/tuple (tuple(allocator_arg_t, const _Alloc&,
> const tuple<_UElements...>&), tuple(allocator_arg_t, const _Alloc&,
> tuple<_UElements...>&&)): Add a check for _NonNestedTuple.
> * testsuite/20_util/tuple/cons/nested_tuple_construct.cc: Adjust.
Since Jonathan is going to be out-of-reach for next week due to a
well-deserved holiday, would it be ok
if Paolo approves such patches?
More information about the Libstdc++
mailing list