~/talk

Better C++14 reflections

Talkat Meeting C++ 2018 · 2018-11-15..11-17· [rust]
links:none on file
slides:none on file

Claims a working C++14 reflection solution that needs no macros or external tooling and ships as Boost.PPR (GitHub). Implements auto ostream, comparisons, hashing and serializers by deriving field count via aggregate initialization, using an ubic conversion trick and a compile-time binary search to get logarithmic instantiation depth. Also shows a recursive approach and a loophole friend-function trick (MSVC/GCC/Clang support) and notes a much simpler C++17 structured-binding solution but with better compile-time performance tradeoffs.

AI-written summary · about

  1. 0:00Start
  2. 0:48Some structure
  3. 1:54What's in the header?
  4. 2:19We need to go deeper
  5. 4:37Basic idea for counting fields
  6. 8:09Putting all together. Simplified version :-
  7. 16:16Naive solution
  8. 26:49Getting the field type recursively
  9. 30:36Type Loophole
~/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.