[libcxx-commits] [PATCH] D80820: [libc++] Overhaul initialization tests in std::array

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri May 29 10:53:51 PDT 2020


ldionne added a comment.

This patch adds tests that highlight some problems with the current array implementation. Basically, it highlights that we need to pick between:

1. Don't implement constexpr support properly in `std::array<T, 0>`
2. Make `std::array<T, 0>` non-trivial even when T is trivial (which is an ABI break)
3. Return `nullptr` from `std::array<T, 0>::begin()` (which is also an ABI break)

Note that both ABI breaks are benign -- I would be surprised if folks relied on `std::array<T, 0>` at ABI boundaries.

Next, I'll submit a patch that picks (3) as the best solution for now, which is also what other implementations do.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80820/new/

https://reviews.llvm.org/D80820





More information about the libcxx-commits mailing list