diff --git a/icu4c/source/common/unicode/strenum.h b/icu4c/source/common/unicode/strenum.h index 0e085e26ff..a590470240 100644 --- a/icu4c/source/common/unicode/strenum.h +++ b/icu4c/source/common/unicode/strenum.h @@ -199,7 +199,7 @@ public: * @return TRUE if the enumerations are equal. FALSE if not. * @draft ICU 3.6 */ - virtual UBool operator!=(const StringEnumeration& that)const {return !operator==(that);}; + virtual UBool operator!=(const StringEnumeration& that)const; protected: /** diff --git a/icu4c/source/common/ustrenum.cpp b/icu4c/source/common/ustrenum.cpp index 5b5e1ae41e..2a7acf6801 100644 --- a/icu4c/source/common/ustrenum.cpp +++ b/icu4c/source/common/ustrenum.cpp @@ -112,10 +112,15 @@ StringEnumeration::setChars(const char *s, int32_t length, UErrorCode &status) { return NULL; } UBool -StringEnumeration::operator==(const StringEnumeration& that)const{ +StringEnumeration::operator==(const StringEnumeration& that)const { return getDynamicClassID() == that.getDynamicClassID(); } +UBool +StringEnumeration::operator!=(const StringEnumeration& that)const { + return !operator==(that); +} + // UStringEnumeration implementation --------------------------------------- *** UStringEnumeration::UStringEnumeration(UEnumeration* _uenum) :