r/cpp • u/rsjaffe • Sep 14 '26
Push-based vs Pull-based Customization
https://brevzin.github.io/c++/2026/09/14/push-vs-pull/Emulating Rust attributes with reflection (or at least trying to).
48
Upvotes
View all comments
Show parent comment
4
u/daveedvdv EDG front end dev, WG21 DG Sep 17 '26
It's not a typo. This construct occurs within a "token sequence literal", which is much like a string literal: The compiler consumes every element "blindly" until it sees the closing delimiter. Sometimes, you don't that "consume blindly" and instead want to temporarily "escape" the consumption mechanism. Both in string literals and in token sequence literals the "escape" is signaled with a backslash.