> Can we use set data structure with pair of values?
Yes.
> If yes, how would the values be sorted?
If we don't provide a predicate to compare pairs, the members of the pair must be LessThanComparable, and the overloaded operator< for std::pair would be used. Which