~/talk

Teaching Old Compilers New Tricks: Transpiling C++17 to C++11

Talkat CppCon 2018 · 2018-09-23..09-28· [compilers-and-language-design, c-and-cpp]
slides:none on file

A libclang-based tool called clang-from-the-future reads C++17 and emits equivalent C++11 source by performing libclang AST rewriting and a custom rewrite/template-specialization engine, handling digit separators, binary literals, structured bindings, constexpr-if, fold expressions, and return-type deduction. It runs as a preprocessing step, integrates by swapping CXX or adding a frontend flag, produces the same executables on older compilers (example: GCC 4.8), includes a test suite, is on GitHub, and currently covers a small, growing feature set.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 7:28Why C++17 matters
  3. 10:40Introducing Clang-from-the-Future
  4. 13:52Demo: if/initializer syntax
  5. 17:20Demo: constexpr transformations
  6. 19:15Demo: structured bindings
  7. 23:10Demo: pack expansions
  8. 24:46How the tool works
  9. 26:56Integration with build systems
  10. 27:39Live test suite demo
  11. 29:25Use cases and benefits
  12. 30:28Current status and future
~/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.