Add namespace to the function save_auto_state and present in general.h.