~/talk

C++ Reflection via Clang LibTooling

Talkat C++Now 2018 · 2018-05-06..05-11· [c-and-cpp]
links:none on file
slides:none on file

A Clang LibTooling-based tool parses the Clang AST and emits generated metadata headers that define a reflect function returning a specialization of a metadata_instance for each struct/class. The metadata fills a data_members tuple of name/reference bindings so code uses std::apply to run a recursive serialize that prints JSON. The tool consumes compile_commands.json plus file list, updates headers when types change, and supports nested types; future work targets richer AST nodes like namespaces and classes.

AI-written summary · about

  1. 0:00Intro
  2. 0:18Abstract Syntax Tree
  3. 1:09Reflect function
  4. 1:25Generated meta_data_instance
  5. 1:58Writing a Serialization Method
  6. 3:20Tool Usage
  7. 3:42Modify vec3
  8. 4:13Modify main.cpp
  9. 4:31Applications
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.