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

--- Comment #2 from Niall Douglas <s_gccbugzilla at nedprod dot com> ---
(In reply to Jonathan Wakely from comment #1)
> (In reply to Niall Douglas from comment #0)
> > I would assume that the ABI ship has sailed, as usual
> 
> Nope.

Ok, so if you did want to reuse span<byte> as any future
std::file_handle::buffer_type, the following program would compile:

```
#include <span>
#include <type_traits>
#include <sys/uio.h>

using buffer_type = std::span<std::byte>;

static_assert(sizeof(buffer_type) == sizeof(struct iovec));
static_assert(std::is_trivially_copyable_v<buffer_type>);
static_assert(std::is_standard_layout_v<buffer_type>);
static_assert(std::is_layout_compatible_v<buffer_type, struct iovec>);
```

Reply via email to