[libcxx-commits] [PATCH] D58639: First part of P1227R2 - Signed ssize() functions, unsigned size() functions
Marshall Clow via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Feb 26 16:29:23 PST 2019
mclow.lists marked 6 inline comments as done.
mclow.lists added inline comments.
================
Comment at: libcxx/include/span:22
// [views.span], class template span
-template <class ElementType, ptrdiff_t Extent = dynamic_extent>
+template <class ElementType, size_t Extent = dynamic_extent>
class span;
----------------
ldionne wrote:
> 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.
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.
================
Comment at: libcxx/include/span:201
using pointer = _Tp *;
- using const_pointer = const _Tp *;
+ using const_pointer = const _Tp *; // not in standard
using reference = _Tp &;
----------------
ldionne wrote:
> Would it be worth adding a reference to [LWG3144](http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#3144)? This way someone can remember to remove this once the DR is applied.
I'll just remove them. Don't know why they re-appeared.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58639/new/
https://reviews.llvm.org/D58639
More information about the libcxx-commits
mailing list