When there is no bool b in struct A, the code works. When bool b is there, ar & mat gives error but registering elements
bool b
struct A
ar & mat