C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] Aggregates are named tuples
From: language.lawyer_at_[hidden]
Date: 2020-03-07 18:34:40


(off-list)

On 08/03/2020 02:07, Barry Revzin via Std-Proposals wrote:
> On Sat, Mar 7, 2020 at 7:49 AM Antony Polukhin via Std-Proposals <
> std-proposals_at_[hidden]> wrote:
>
>> Hello,
>>
>> There's a an idea to make
>> std::get, std::tuple_element and std::tuple_size work with aggregates that
>> have no base classes. In that way we get effective std::tuple replacement
>> with elements also accessible via a readable name.
>>
>> Deatails are described here:
>> https://apolukhin.github.io/papers/Aggregates%20are%20named%20tuples.html
>>
>> Any comments and suggestions are wellcome.
>> --
>> Std-Proposals mailing list
>> Std-Proposals_at_[hidden]
>> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
>
> Check out P1858

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1858r1.html:
"""
This paper proposes the ability to declare a variable pack wherever we can declare a variable today:

namespace xstd {
     template <typename... Ts>
     struct tuple {
         Ts... elems;
     };
}
"""

But... non-static data members aren't variables today.


STD-PROPOSALS list run by herb.sutter at gmail.com

Standard Proposals Archives on Google Groups