[libcxx-commits] [PATCH] D60666: Fix some constexpr members in array<T, 0>
Zoe Carver via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat May 4 19:23:15 PDT 2019
zoecarver updated this revision to Diff 198154.
zoecarver added a comment.
- Update tests
- Union only exist in C++17 and up
Here is <https://gist.github.com/zoecarver/cdc4d24b7adac8c0f36edee156cc2f19> an implementation where `array<T, 0>{{}}` errors (but I don't think it's needed anymore). Additionally, I have tested that all methods which are not intended to error are constant expressions.
Both `std::array<T, x>` and `std::array<T, 0>` are not trivially destructible if `T` is not. Therefore I think it is okay for this patch to be the same (let me know if I am missing something though).
If you give this implementation a thumbsup I will add more tests (and fail tests).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60666/new/
https://reviews.llvm.org/D60666
Files:
include/array
test/std/containers/sequences/array/size_and_alignment.pass.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60666.198154.patch
Type: text/x-patch
Size: 8625 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190505/5fa3287a/attachment.bin>
More information about the libcxx-commits
mailing list