add <atomic> to types.hpp header.