BUG: Avoid duplicate definition by using cmsys_STL_STRING_NEQ_CHAR_DEFINED and cmsys_STL_STRING_NO_NEQ_CHAR.

This commit is contained in:
Brad King 2005-04-06 16:15:13 -04:00
parent f0b10ad061
commit 5d7593bf50
1 changed files with 3 additions and 0 deletions

View File

@ -150,8 +150,11 @@ using ::ends;
using ::flush; using ::flush;
} }
// The string class is missing these operators so add them // The string class is missing these operators so add them
#if !defined(cmsys_STL_STRING_NEQ_CHAR_DEFINED)
# define cmsys_STL_STRING_NO_NEQ_CHAR
inline bool operator!=(std::string const& a, const char* b) inline bool operator!=(std::string const& a, const char* b)
{ return !(a==std::string(b)); } { return !(a==std::string(b)); }
#endif
inline bool operator==(std::string const& a, const char* b) inline bool operator==(std::string const& a, const char* b)
{ return (a==std::string(b)); } { return (a==std::string(b)); }