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

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Niall Douglas from comment #0)
> I would assume that the ABI ship has sailed, as usual, but if libstdc++'s
> span<T> could instead have the layout:
> 
> {
>   T *p;
>   size_t l;
> }
> 
> ... then a span<byte> would be layout-compatible with struct iovec,

No it won't, because iovec has a void* member, and span<byte> has a byte*
member, which makes them not layout-compatible. Similarly for span<const char>
or any other specialization of span.
  • [Bug libstdc++/95609] span&l... redi at gcc dot gnu.org via Gcc-bugs

Reply via email to