C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Making tuple an aggregate

From: Lénárd Szolnoki <cpp_at_[hidden]>
Date: Tue, 07 Jun 2022 21:13:53 +0100
Never mind, just checked the available tuple constructors...

On 7 June 2022 21:11:42 BST, "Lénárd Szolnoki via Std-Proposals" <std-proposals_at_[hidden]> wrote:
>Hi,
>
>What breaks by making tuple an aggregate? Would it affect ABI?
>
>There was a good point about EBO, and I think neither `Ts... ts;` nor `[[no_unique_address]] Ts... ts;` would produce the same layout as current tuple implementations, at least on Itanium. AFAIK current implementations do make use of EBO, but they don't overlap non-empty tuple members on tail padding, while [[no_unique_address]] would do that.
>
>Maybe it could be worked around with `[[no_unique_address]] wrapper<Ts>... ts;`, but then initialization with brace-elision can become awkward (see std::array).
>
>Cheers,
>Lénárd
>
>On 7 June 2022 20:27:45 BST, Jason McKesson via Std-Proposals <std-proposals_at_[hidden]> wrote:
>>There's one thought that immediately comes to mind: even if we can
>>make parameter pack members like you want... you can't change how
>>`std::tuple` works. It is going to have to be given a different name.
>>--
>>Std-Proposals mailing list
>>Std-Proposals_at_[hidden]
>>https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2022-06-07 20:13:57