Comparator working

Is comparator works opposite in set and priority_queue?