Binary Parsing, C++23 Style
summary
Claims an embedded DSL that produces compile-time parser generation using C++23 template metaprogramming and constexpr, avoiding handwritten boilerplate or external codegen. Implementation is ~5,000 lines on GitHub (hariceratops/s2s) and uses std::expected, span/file streams and folded template pipelines to read fields, handle padding/endianness (compile-time only) and bubble errors with readable diagnostics. A minimized example compiles and works; benchmarks are provisional.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 3:30Binary parsing challenges
- 9:04Possible solutions
- 10:07Project goals
- 13:21Template metaprogramming primer
- 15:08Building field descriptor system
- 21:11Struct field constraints
- 27:14Compile-time parser generation
- 35:19API and benchmarks
- 36:22C++26 reflection plans
- 39:13Conclusion
related talks
42mGenerating Parsers in C++ with Maphoon - Part 1 of 2
07mCan I has grammar?
41mParsing Safely, from 500MB/s to 2GB/s
56mboost.tmp: your DSL for Metaprogramming
01h 03mC++ Reflection: Back on Track
02h 02mPeering forward: C++'s next decade
23mFunctional Programming in C++ (Run time vs Compile time types)
54mCompile-Time Validation in C++ Programming
