[PATCH] D41223: [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types.

2020-03-01 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In D41223#1899394 , @jtbandes wrote: > The lack of `_LIBCPP_CONSTEXPR_AFTER_CXX14` on the `array` > specialization's `begin()`, `end()`, and other methods seems to be a bug: > https://stackoverflow.com/questions/60462569/empty-std

[PATCH] D41223: [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types.

2020-02-28 Thread Jacob Bandes-Storch via Phabricator via cfe-commits
jtbandes added a comment. Herald added subscribers: arphaman, ldionne. Herald added a project: LLVM. The lack of `_LIBCPP_CONSTEXPR_AFTER_CXX14` on the `array` specialization's `begin()`, `end()`, and other methods seems to be a bug: https://stackoverflow.com/questions/60462569/empty-stdarrayt-0

[PATCH] D41223: [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types.

2018-02-07 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL324526: [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default… (authored by EricWF, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://revie

[PATCH] D41223: [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types.

2018-02-07 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCXX324526: [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default… (authored by EricWF, committed by ). Repository: rCXX libc++ https://reviews.llvm.org/D41223 Files: include/__

[PATCH] D41223: [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types.

2018-02-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. Accepting new version. https://reviews.llvm.org/D41223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41223: [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types.

2018-02-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 133285. EricWF added a comment. - Update with new, hopefully working, version. https://reviews.llvm.org/D41223 Files: include/__config include/array test/libcxx/containers/sequences/array/array.zero/db_back.pass.cpp test/libcxx/containers/sequences/a

[PATCH] D41223: [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types.

2018-02-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF reopened this revision. EricWF added a comment. This revision is now accepted and ready to land. This was reverted as it caused build failures. Re-opening with new version. Repository: rCXX libc++ https://reviews.llvm.org/D41223 ___ cfe-co

[PATCH] D41223: [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types.

2018-02-03 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCXX324182: [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default… (authored by EricWF, committed by ). Repository: rCXX libc++ https://reviews.llvm.org/D41223 Files: include/ar

[PATCH] D41223: [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types.

2018-02-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 132758. EricWF added a comment. - Address review comments. - Add initialization tests. https://reviews.llvm.org/D41223 Files: include/array test/std/containers/sequences/array/array.cons/default.pass.cpp test/std/containers/sequences/array/array.data/d

[PATCH] D41223: [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types.

2018-02-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D41223#997264, @EricWF wrote: > > and also test `{{}}` cases. > > I don't agree those cases are valid. That initialization syntax suggests > there is something in the zero-sized array which is default constructible - > or that users should be

[PATCH] D41223: [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types.

2018-02-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D41223#957308, @mclow.lists wrote: > I'm wondering if it's not a better idea to have an explicit specialization > for size == 0 > > template > class array { > // and so on. > }; I think that's probably more work than it's worth. I th

[PATCH] D41223: [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types.

2017-12-15 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added a comment. BTW, this is https://cplusplus.github.io/LWG/issue2157 , so please update `www` accordingly, and also test `{{}}` cases. https://reviews.llvm.org/D41223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[PATCH] D41223: [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types.

2017-12-15 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I'm wondering if it's not a better idea to have an explicit specialization for size == 0 template class array { // and so on. }; https://reviews.llvm.org/D41223 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D41223: [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types.

2017-12-14 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added inline comments. Comment at: include/array:135 + _LIBCPP_INLINE_VISIBILITY + static void __swap(_StorageT& __lhs, _StorageT& __rhs) { +std::swap_ranges(__lhs, __lhs + _Size, __rhs); Just asking: no compiler is dumb enough to not inline this en

[PATCH] D41223: [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types.

2017-12-13 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 126898. EricWF added a comment. Fix begin/end/data. === https://reviews.llvm.org/D41223 Files: include/array test/std/containers/sequences/array/array.cons/default.pass.cpp test/std/containers/sequences/array/array.data/data.pass.cpp

[PATCH] D41223: [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types.

2017-12-13 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added a reviewer: mclow.lists. This patch fixes llvm.org/PR35491 The fix attempts to maintain ABI compatibility by replacing the array with a instance of `aligned_storage`. https://reviews.llvm.org/D41223 Files: include/array test/std/containers/sequen