c++ Programming Glossary: lhs.id
STL maps with user-defined objects http://stackoverflow.com/questions/1102392/stl-maps-with-user-defined-objects bool operator const Class1 lhs const Class1 rhs return lhs.id rhs.id std map Class1 int Class1Compare c2int It just so happens.. bool operator const Class1 lhs const Class1 rhs return lhs.id rhs.id The advantage of this is that it will be picked by std..
Cant insert to std::map (G++) http://stackoverflow.com/questions/15868776/cant-insert-to-stdmap-g bool operator ServerPP const lhs ServerPP const rhs return lhs.id rhs.id With this addition you can see your program compiling.. operator ServerPP const lhs ServerPP const rhs return lhs.id rhs.id std map std string std set ServerPP serv_comp RemindTable..
Ordered sort in STL containers http://stackoverflow.com/questions/18659882/ordered-sort-in-stl-containers operator bool const foo lhs const foo rhs const return lhs.id rhs.id int main std vector foo v std sort std begin v std end.. std begin v std end v const foo lhs const foo rhs return lhs.id rhs.id Finally you can also overload the comparison operators.. friend bool operator const foo lhs const foo rhs return lhs.id rhs.id friend bool operator const foo lhs const foo rhs return..
|