[libcxx-commits] [PATCH] D96523: [libc++] Rewrite the tuple constructors to be strictly Standards conforming
Eric Fiselier via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Apr 30 09:54:14 PDT 2021
EricWF added a comment.
In general this removes a bunch of carefully constructed SFINAE meant to improve compile times.
I'll look into getting that back.
================
Comment at: libcxx/include/tuple:878
+ template <class _Up1, class _Up2, class ..._DependentTp>
+ struct _EnableImplicitMoveFromPair : _And<
+ is_constructible<_FirstType<_DependentTp...>, _Up1>,
----------------
Why can't we use alias templates rather than instantiating a big type here?
================
Comment at: libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp:52
+ std::tuple<Explicit> bar(std::move(d)); ((void)bar);
+#if TEST_STD_VER < 17
+ assert(count == 1);
----------------
What's going on here? Why are there different answers depending on the dialect?
================
Comment at: libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/tuple_array_template_depth.pass.cpp:1
-//===----------------------------------------------------------------------===//
-//
----------------
ldionne wrote:
> EricWF wrote:
> > Why was this file deleted?
> Because the extension that allows constructing a tuple from an array was removed (as noted in the release notes).
This tested template depth. And this patch broke large tuples. It should have been rewritten in some other form.
We need to reallow big tuples and add another test.
================
Comment at: libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/tuple_array_template_depth.pass.cpp:1
-//===----------------------------------------------------------------------===//
-//
----------------
EricWF wrote:
> ldionne wrote:
> > EricWF wrote:
> > > Why was this file deleted?
> > Because the extension that allows constructing a tuple from an array was removed (as noted in the release notes).
> This tested template depth. And this patch broke large tuples. It should have been rewritten in some other form.
>
> We need to reallow big tuples and add another test.
It's worth noting that this was a conforming extension. Because `array` supports the `tuple-like` protocol. I'm disappointed this was removed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96523/new/
https://reviews.llvm.org/D96523
More information about the libcxx-commits
mailing list