const optional ref compare