use std::pair in the CompactingMap