C++ reflection via C++ code generation in C++
Details
THIS IS THE MEETUP FOR THE ONLINE EVENT. Please RSVP for the in-person meetup if you plan to join us in-person š.
A program inspecting its own code is called reflection. C++ has some rudimentary reflection features: you can get a function's return type, get the string name of a type, and ask questions like "does this type have a custom destructor?" or "does this class have a size() method?".
But what if you want more than what C++ provides out of the box? What about looping over the variables in a struct, or listing all of the subclasses in your code base? And how do we avoid bloating our program's binary?
In this talk, strager will show you how to extend C++'s syntax using code generation via macros, constexpr, and generating C++ source files.
āā
19:00 - 20:00 - Program Presentation


