Date: Sun, 17 Nov 2024 18:43:59 +0100
On 17. 11. 2024, at 14:56, Andrei Alexandrescu via SG7 <sg7_at_[hidden]> wrote:
--Thank you Bengt for taking a look. Looking forward to the coming discussion.Hana, are there assigned time slots for the papers?On Thu, Nov 14, 2024 at 5:27 PM Bengt Gustafsson via SG7 <sg7_at_[hidden]> wrote:--Hi,
P3420's additions to reflection seems to enable the semantics I was contemplating for the decorator idea. The decorator syntax:
@my_decorator class MyClass { ... };
would call the conteval function my_decorator with the reflection of the not-yet-defined class MyClass. my_decorator may use the manipulation techniques of P3420 to inject whatever it likes instead of the original MyClass declaration. This would work the same for other types of declarations. The USP of the decorator syntax is that you don't pollute the namespace with names that you are not supposed to use. With the freedom that queue_injection offers it would be possible to add the original declaration as well as a modified version, _or_ only add the modified declaration. For functions this will require a metafunction body_of or something like that to inject the manually written function body.
I don't really understand why P3420 is entitled Reflection of templates, isn't it more about manipulating declarations (although this in itself is more complicated for template declarations).
A function like prototype_of would work equally well for the reflection of a regular function, right?
I noted as a drawback of only having meta::info for all reflections is that it is non-trivial to understand which actual kind of reflection is valid for calling the new metafunctions. I'm not saying that we should go back to multiple types, but rather that it is important to document which kinds of reflections are valid for each metafunction.
I'm looking forward to the SG7 discussions in Wroclaw!
Bengt
On 2024-11-14 17:51, Andrei Alexandrescu via SG7 wrote:
Hello,
Following discussions with implementers we have uploaded a revised version of P3420:
This is the version that will be discussed in SG7. See you soon!
-- Bengt Gustafsson
SG7 mailing list
SG7_at_[hidden]
https://lists.isocpp.org/mailman/listinfo.cgi/sg7
SG7 mailing list
SG7_at_[hidden]
https://lists.isocpp.org/mailman/listinfo.cgi/sg7
Received on 2024-11-17 17:44:14