Fun with (user-defined) attributes
summary
C++17 makes unknown attributes ignorable, enabling real use of user-defined attributes. The talk explains writing a custom attribute parser and shows concrete results: generating boilerplate like enum-to-string conversion and serialization code, and emulating default comparisons; these generators integrate with static analyzers and documentation tools to produce compilable code that reduces manual repetition.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 7:19Attributes matter
- 10:22Flexibility limits
- 17:00Use cases
- 21:02Templates and function attributes
- 26:27Development with attributes
- 33:06Open source improvements
- 35:30Risks of custom attributes
- 38:15Usability challenges
- 41:06Interface design
- 44:14Syntax pitfalls
- 47:11Marketing expectations
- 50:12Future trends
- 53:51Summary
related talks
01h 02mHow to Hide C++ Implementation Details
35mImproving Your Attributes
52mThe Code is Documentation Enough
31m“New standards to the rescue: the view through an IDE’s glasses”
01h 11mPragmatic Simplicity - Actionable Guidelines To Tame Cpp Complexity
51mSimplicity: Not Just for Beginners
27mParsing, Compiling, and Static Metaprogramming
01h 01mCode Analysis++
