C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Expand arrays with known sizes using ellipses

From: Chris Gary <cgary512_at_[hidden]>
Date: Fri, 22 Sep 2023 22:50:24 -0600
:D
It ought to be, IMO.
What else is there left to do?

When it comes to reflection, do I really need to do anything else but
"walk" public members in the same way?

Something like "OrdinaryStruct ...clone;" then "clone<5>;" is easy to
verify, eliminates the need for special accessors, and resembles the other
use-cases mentioned.

Private members are none of anything else's business, functions can be
inspected using concepts, and most use-cases for what's left for reflection
that I've encountered are really just serialization/marshalling of structs
with no private members (e.g. RPC parameter packs or handling form data for
a UI).

On Fri, Sep 22, 2023 at 10:10 PM Thiago Macieira via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> On Friday, 22 September 2023 11:50:35 PDT Chris Gary via Std-Proposals
> wrote:
> > // Unpack public type members of MiscData in declaration order.
> > // Unpack public value members of a MiscData instance in the same
> order.
> > Mirror< MiscData... > clone{ data... };
>
> This looks like reflection.
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Software Architect - Intel DCAI Cloud Engineering
>
>
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2023-09-23 04:50:38