update c++ class memory layout