like boost serialize, which overloads the & operator