[libcxx-commits] [PATCH] D96523: [libc++] Rewrite the tuple constructors to be strictly Standards conforming

Eric Fiselier via libcxx-commits libcxx-commits at lists.llvm.org
Fri Apr 30 10:01:13 PDT 2021


I'm working to see if I can fix forward the template depth and constexpr
issues, but I would appreciate some help from @ldionne as the original
author.

On Fri, Apr 30, 2021 at 12:54 PM Eric Fiselier via Phabricator <
reviews at reviews.llvm.org> wrote:

> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210430/e30b8e9e/attachment.html>


More information about the libcxx-commits mailing list