C++ is a Metacompiler
summary
Claims C++17+ can metacompile DSLs embedded in string literals into a numeric meta‑assembly which the cctm library translates into constexpr functions usable at compile or run time. Implementation is ~20,000 LOC, avoids the standard library, uses handwritten lexers plus an LL parser generator, and a backend of continuation machines implemented in continuation passing style with a vartic pack for universe and stage. Proof‑of‑concept compiles on GCC 11.4 and Clang 14, example suites compile in ~4.1s (GCC) with ~16–17 KB binaries; recursion still requires explicit type info. Roadmap targets semi‑self‑hosting plus lexer/LR parser and data‑structure generators.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 1:50What is a metacompiler
- 10:00Methodology overview
- 15:22CCTM library introduction
- 29:22Language showcase
- 36:28Performance benchmarks
- 38:37Future road map
- 42:32Q&A
related talks
01h 01mExpressive Compile Time Parsers
01h 01m“How bad is Meta-Programming still today?"
01h 48m“Meta: Thoughts on generative C++”
01h 09m“Compile-time programming and reflection in C++20 and beyond”
01h 00mconstexpr: Applications
01h 01mMeta
01h 39m“Thoughts on a more powerful and simpler C++ (5 of N)”
01h 04mJust-in-Time Compilation: The Next Big Thing?
