std::set with user defined type, how to ensure no duplicates

operator== is not used by std::set. Elements a and b are considered equal iff !(a < b) && !(b < a)

Leave a Comment