devxlogo

Equivalence Relationship in STL

Equivalence Relationship in STL

Certain STL containers and algorithms require that you overload operator bool operator==( const T & arg1, const T & arg2){ return (!(arg1

In other words, you don't need to define an overloaded version of operator == (or any other relational operator) because STL is clever enough to generate these operators from operator <. you only need to define an overloaded version of operator for user-defined types.>

devx-admin

Share the Post: