[cfe-dev] [libc++] (Yet) more places to use std::addressof

Marshall Clow via cfe-dev cfe-dev at lists.llvm.org
Wed Sep 30 12:01:52 PDT 2015


On Fri, Sep 18, 2015 at 4:38 AM, Sebastian Theophil via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> Hi,
>
> This just bit me. In lines 386 and 387 of the utility header,
> std::addressof should be used:
>
>     void
>     swap(pair& __p) _NOEXCEPT_(__is_nothrow_swappable<first_type>::value &&
>                                __is_nothrow_swappable<second_type>::value)
>     {
>         _VSTD::iter_swap(&first, &__p.first);
>         _VSTD::iter_swap(&second, &__p.second);
>     }
>
>
> Thanks for the bug report; this has been fixed in a better way ;-)

-- Marshall
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150930/bf329dda/attachment.html>


More information about the cfe-dev mailing list