https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95609

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>:

https://gcc.gnu.org/g:0f7cd5e5735e5536bf7bc8ca2b998f7ce8b4ddee

commit r11-4475-g0f7cd5e5735e5536bf7bc8ca2b998f7ce8b4ddee
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Wed Oct 28 12:07:40 2020 +0000

    libstdc++: Make std::span layout-compatible with struct iovec [PR 95609]

    This change reorders the data members of std::span so that span<byte> is
    layout-compatible with common implementations of struct iovec. This will
    allow span<byte> to be used directly in places that use a struct iovec
    to do scatter-gather I/O.

    It's important to note that POSIX doesn't specify the order of members
    in iovec. Also the equivalent type on Windows has members in the other
    order, and uses type ULONG (which is always 32-bit whereas size_t is
    64-bit for Win64). So this change will only help for certain targets and
    an indirection between std::span and I/O system calls will still be
    needed for the general case.

    libstdc++-v3/ChangeLog:

            PR libstdc++/95609
            * include/std/span (span): Reorder data members to match common
            implementations of struct iovec.
            * testsuite/23_containers/span/layout_compat.cc: New test.

Reply via email to