The post explores the challenges and solutions related to using class types as non-type template parameters in C++. It delves into how template argument equivalence can be achieved by comparing class members structurally, and discusses approaches like defaulted <=> operator and custom serialization/deserialization. It also covers issues around normalization and deserialization processes, shedding light on complex cases like handling std::vector and std::string. The C++20 and C++23 rules are extended to better support various class types through member-wise comparison and normalization techniques.
Table of contents
Setting the StageA Serialization ProblemA Normalization ProblemA Deserialization ProblemWhat are the Options?The PaperReflection Will Fix ItA Proposal EmergesEnding with a Fun ExampleSort: