C++ Logo

std-proposals

Advanced search

Re: Aggregates are named tuples

From: Tony V E <tvaneerd_at_[hidden]>
Date: Sat, 07 Mar 2020 20:50:17 -0500
Narrator: it wasn't off-list


Sent from my BlackBerry portable Babbage Device
  Original Message  
From: language.lawyer--- via Std-Proposals
Sent: Saturday, March 7, 2020 6:34 PM
To: Barry Revzin via Std-Proposals
Reply To: std-proposals_at_[hidden]
Cc: language.lawyer_at_[hidden]
Subject: Re: [std-proposals] Aggregates are named tuples

(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 mailing list
Std-Proposals_at_[hidden]
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2020-03-07 19:53:03