This is an archive of the discontinued LLVM Phabricator instance.

First part of P1227R2 - Signed ssize() functions, unsigned size() functions
ClosedPublic

Authored by mclow.lists on Feb 25 2019, 11:23 AM.

Details

Summary

Implement the bits that change <span> from using signed to unsigned.

Diff Detail

Event Timeline

mclow.lists created this revision.Feb 25 2019, 11:23 AM
ldionne accepted this revision.Feb 26 2019, 3:33 PM

LGTM, please consider my comments and commit without requiring another round of review. Thanks for doing this!

libcxx/include/span
22

Did nobody discuss the fact that this is an ABI (and API) break? I know it's not an ABI break as far as the Standard is concerned (because the Standard hasn't shipped yet), but it is an ABI break for our implementation, no?

Granted, folks that this will break are building with -std=c++2a, but I want to confirm we're doing this on purpose and we acknowledge what this change means.

201

Would it be worth adding a reference to LWG3144? This way someone can remember to remove this once the DR is applied.

libcxx/test/std/containers/views/types.pass.cpp
66

std::size_t (only for consistency, obviously)

71

std::size_t

This revision is now accepted and ready to land.Feb 26 2019, 3:33 PM
mclow.lists marked 6 inline comments as done.Feb 26 2019, 4:24 PM
mclow.lists added inline comments.
libcxx/include/span
22

I don't think anyone cared (besides you and me) because libc++ is the only library vendor to have shipped a std::span implementation (and, as such has an ABI to break).

My opinion is twofold:

  • This is "more correct" (I was one of the authors of the paper pushing this change)
  • Once it ships in a standard, it will be nigh-impossible to change.
201

I'll just remove them. Don't know why they re-appeared.

mclow.lists closed this revision.Feb 26 2019, 4:31 PM
mclow.lists marked 2 inline comments as done.

Committed as revision 354936.