r/cpp • u/rsjaffe • Sep 14 '26
Push-based vs Pull-based Customization
https://brevzin.github.io/c++/2026/09/14/push-vs-pull/Emulating Rust attributes with reflection (or at least trying to).
48
Upvotes
View all comments
2
u/TheoreticalDumbass :illuminati: Sep 15 '26 edited Sep 15 '26
Suppose we had annotation hook
on_class_completion_request()Example:
Let us also assume hooks
on_class_declaration()andon_class_template_declaration()Then we might be able to do:
Problem with classes is they can be templated and not templated, this definition deferring via
on_class_completion_request()is needed for templated classes (IIUC).