[llvm-bugs] [Bug 17550] tuple::operator=(derived_from_tuple)

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Feb 22 11:57:44 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=17550

Louis Dionne <ldionne at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Fixed By Commit(s)|                            |a0839b14df6de99fe29bee7cdff
                   |                            |f182d50de665d
         Resolution|---                         |FIXED
             Status|REOPENED                    |RESOLVED

--- Comment #12 from Louis Dionne <ldionne at apple.com> ---
Fix merged:

commit a0839b14df6de99fe29bee7cdfff182d50de665d
Author: Louis Dionne <ldionne at apple.com>
Date:   Tue Jul 31 11:56:20 2018 -0400

    [libc++] Fix tuple assignment from types derived from a tuple-like

    The implementation of tuple's constructors and assignment operators
    currently diverges from the way the Standard specifies them, which leads
    to subtle cases where the behavior is not as specified. In particular, a
    class derived from a tuple-like type (e.g. pair) can't be assigned to a
    tuple with corresponding members, when it should. This commit re-implements
    the assignment operators (BUT NOT THE CONSTRUCTORS) in a way much closer
    to the specification to get rid of this bug. Most of the tests have been
    stolen from Eric's patch https://reviews.llvm.org/D27606.

    As a fly-by improvement, tests for noexcept correctness have been added
    to all overloads of operator=. We should tackle the same issue for the
    tuple constructors in a future patch - I'm just trying to make progress
    on fixing this long-standing bug.

    PR17550
    rdar://15837420

    Differential Revision: https://reviews.llvm.org/D50106

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210222/6181c6a4/attachment.html>


More information about the llvm-bugs mailing list