public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/95609] New: span<T> could have better layout
@ 2020-06-09 16:23 s_gccbugzilla at nedprod dot com
  2020-06-09 20:46 ` [Bug c++/95609] " redi at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: s_gccbugzilla at nedprod dot com @ 2020-06-09 16:23 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95609
           Summary: span<T> could have better layout
           Product: gcc
           Version: 10.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: s_gccbugzilla at nedprod dot com
  Target Milestone: ---

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, which would
save libstdc++ having to reimplement span<> with a struct iovec compatible
layout for any future std::file_handle::buffer_type, if that gets standardised.

I put notice of this out onto lib-ext last year requesting this of span<T>
implementations. libc++ heeded my request, MSVC have very kindly undone their
initial implementation to meet the pointer + size layout plus add standard
layout, so they'll be on that too going forth.

In the end, this request is about as unimportant for right now as you can get.
It's purely for saving you, Jonathan, avoidable work later on.

Niall

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-08-23 13:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-09 16:23 [Bug c++/95609] New: span<T> could have better layout s_gccbugzilla at nedprod dot com
2020-06-09 20:46 ` [Bug c++/95609] " redi at gcc dot gnu.org
2020-06-11 12:10 ` s_gccbugzilla at nedprod dot com
2020-06-11 13:37 ` redi at gcc dot gnu.org
2020-10-28 12:32 ` [Bug libstdc++/95609] " cvs-commit at gcc dot gnu.org
2020-10-28 12:32 ` redi at gcc dot gnu.org
2020-10-28 14:16 ` s_gccbugzilla at nedprod dot com
2021-08-23 13:35 ` redi at gcc dot gnu.org
2021-08-23 13:51 ` s_gccbugzilla at nedprod dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).