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] Protect allocator-overloads of tuple-from-tuple constructors from cases that would create dangling references.


Hi Ville,

On 29/05/2016 16:42, Ville Voutilainen wrote:
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?
Admittedly, I didn't follow in detail all your latest contributions, but sure, if this work goes only in trunk, please go ahead at your ease. We can certainly revisit details when Jon comes back, but trunk is currently in Stage 1, open for any kind of development work...

Thanks,
Paolo.


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