[libcxx-commits] [PATCH] D80452: [libc++] Complete overhaul of constexpr support in std::array

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri May 22 12:52:43 PDT 2020


ldionne added a reviewer: zoecarver.
ldionne added a comment.

I know there's been discussion before about having to return `nullptr` from `begin()` and `end()` for empty arrays and we didn't want to do it. However, doing so is a valid implementation strategy with the given Standard IIUC, and it would only become incorrect if we adopted https://wg21.link/LWG2157. Given that LWG2157 hasn't made it through yet, I think it's a lot more important to fix the situation of `std::array` in libc++ than implement a maybe-future LWG issue resolution.

Also note that if LWG goes through, there's presumably a way to implement it, so we can just switch to that. However, I don't think removing `constexpr` for the empty `std::array`s is ever going to happen, because that would be way too inconsistent.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80452





More information about the libcxx-commits mailing list