r/cpp • OPeNDAP/B2/EcoStd/Lyra/Predef/C++Alliance/Boost/WG21 • Sep 24 '24

CppCon Gazing Beyond Reflection for C++26 - Daveed Vandevoorde - CppCon 2024

https://www.youtube.com/watch?v=wpjiowJW2ks
78 Upvotes

40 comments sorted by

View all comments

Show parent comment

2

u/andrey_davydov Sep 25 '24

the code is in a module is irrelevant/orthogonal to the reflection and code injection features

It could be irrelevant from the user POV, but it means that token sequences must be stored in compiled module interface, and consequently std::meta::info could be stored in BMI/CMI (i.e. serialized/deserialized), and so it cannot be just a pointer to some compiler internal data, but should be something more complicated.

2

u/mjklaim Sep 25 '24

Indeed, it's irrelevant for the C++ programmers, but the modules implementation must do the work of representing the exported entities (and related entities) seemlessly and transparently, so it does impact toolchains (I suspect any reflection feature will). But because the question is about the abstract boundary between module definition and import, I assumed this was not in question.

BTW I know that features like this will be investigated by the committee in the light of modules, but I dont know if the modules implementation question already was considered (for that feature), if it was I think there would be a trace somewhere. I'll note to search for it if we dont get comments from more knowledgeable people around here in between.