// tag
#p3394
2 posts tagged #p3394.
Annotations: tag-driven serialization comes to C++
P3394 brings serde-style and Jackson-style attribute programming to C++: rename, skip, skip_if_empty, rename_all — all as plain user-defined values queryable by reflection.
Reflection + annotations for hashing: opt out of fields, not whole structs
Krystian Piekos's May 29 post on infotraining.pl shows the cleanest demo so far of P3394 annotations combined with P2996 reflection: opt structs into hashing with [[=hashable]], and opt individual fields out with [[=skipped_for_hash]]. The Hashable concept and the calculate_hash walker fit in 40 lines. No macros.