Fix a problem where older IRIX compilers needed a typecast for certain opperations

This commit is contained in:
ehofman
2003-10-16 12:51:47 +00:00
parent db928ea1ae
commit 3c08eae85b
8 changed files with 58 additions and 11 deletions
+43
View File
@@ -0,0 +1,43 @@
#ifndef __SGI_HXX
#define __SGI_HXX
#include <string>
inline bool
operator!=( const std::string& lhs, const char* rhs)
{
return lhs.compare( rhs ) != 0;
}
inline bool
operator!=( const char* lhs, const std::string& rhs)
{
return rhs.compare( lhs ) != 0;
}
inline bool
operator==( const std::string& lhs, const char* rhs)
{
return lhs.compare( rhs ) == 0;
}
inline bool
operator==( const char* lhs, const std::string& rhs)
{
return rhs.compare( lhs ) == 0;
}
inline std::string
operator+(const std::string& lhs, const char* rhs)
{
return lhs + std::string(rhs);
}
inline std::string
operator+(const char* lhs, const std::string& rhs)
{
return std::string(lhs) + rhs;
}
#endif // !__SGI_HXX
+3 -1
View File
@@ -28,4 +28,6 @@ include_HEADERS = \
ctime \
iomanip \
new \
streambuf
streambuf \
\
IRIX