The attached example contains two versions of MyClass, with suffixes _v1.h and _v2.h. Version 1 is used for writing, 2 for reading. I built a schema evolution rule that mainly prints if it is applied.
The problem I have (and spent rather too much time trying to reproduce) can be seen by running:
This indicates the rule isn't executed, but the on-file content of ver (=1) is not read, either (ver=2 is set by MyClass v2 constructor).
Now open MyClass_v1.h and exchange the order of std::vector<int> fArray and int ver, and rerun ./run.sh:
rule reading class version: 1
This time, the rule is executed, ver=1 is read correctly from file, and set to 99 in memory.