This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

stl set


Hi,

I am a bit confused about STL sets. STL set takes a comparator function as input which returns true if first argument is less than second argument, false otherwise. How does this detect equal elements ?

For eg. set<int> will not allow one int to be inserted twice. How does it check for equality when comparator function doesn't provide that info ?

I tries to go through set code in stl_set.h but couldn;t get anything.

Thanks in advance.

Regards,
Aseem.

--
Nothing will work unless u do.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]