[libcxx-commits] [PATCH] D80821: [libc++] Return nullptr from an empty array begin()
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri May 29 10:53:52 PDT 2020
ldionne created this revision.
Herald added subscribers: libcxx-commits, dexonsmith, jkorous.
Herald added a project: libc++.
Herald added a reviewer: libc++.
ldionne added a parent revision: D80820: [libc++] Overhaul initialization tests in std::array.
The Standard is currently unimplementable. We have to pick between:
1. Not implementing constexpr support properly in std::array<T, 0>
2. Making std::array<T, 0> non-trivial even when T is trivial
3. Returning nullptr from std::array<T, 0>::begin()
It seems that both (1) and (2) are rather important properties to keep,
and other implementations are currently doing (3).
This patch moves libc++ from (1) to (3).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D80821
Files:
libcxx/include/array
libcxx/test/std/containers/sequences/array/array.cons/implicit_copy.pass.cpp
libcxx/test/std/containers/sequences/array/array.data/data.pass.cpp
libcxx/test/std/containers/sequences/array/array.data/data_const.pass.cpp
libcxx/test/std/containers/sequences/array/iterators.pass.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80821.267300.patch
Type: text/x-patch
Size: 5410 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200529/f87793b1/attachment-0001.bin>
More information about the libcxx-commits
mailing list