vc6 bug workaround

This commit is contained in:
Glenn Maynard
2002-10-31 05:17:09 +00:00
parent 7f49ba72b4
commit 07a04df7d7
+18 -8
View File
@@ -248,6 +248,7 @@
// Turn off browser references // Turn off browser references
// Turn off unavoidable compiler warnings // Turn off unavoidable compiler warnings
#if defined(_MSC_VER) && (_MSC_VER > 1100) #if defined(_MSC_VER) && (_MSC_VER > 1100)
#pragma once #pragma once
#pragma component(browser, off, references, "CStdString") #pragma component(browser, off, references, "CStdString")
@@ -261,6 +262,8 @@
#ifndef STDSTRING_H #ifndef STDSTRING_H
#define STDSTRING_H #define STDSTRING_H
#define SS_NO_CONVERSION
//#define SS_NOLOCALE // prevents use/inclusion of <locale> header //#define SS_NOLOCALE // prevents use/inclusion of <locale> header
//#define SS_UNSIGNED // add CString ctor/assign op. for usigned characters //#define SS_UNSIGNED // add CString ctor/assign op. for usigned characters
#define SS_SAFE_FORMAT // use new template style Format() function #define SS_SAFE_FORMAT // use new template style Format() function
@@ -292,6 +295,7 @@
// MIN and MAX. The Standard C++ template versions go by so many names (at // MIN and MAX. The Standard C++ template versions go by so many names (at
// at least in the MS implementation) that you never know what's available // at least in the MS implementation) that you never know what's available
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
template<class Type> template<class Type>
inline const Type& SSMIN(const Type& arg1, const Type& arg2) inline const Type& SSMIN(const Type& arg1, const Type& arg2)
{ {
@@ -1946,15 +1950,21 @@ public:
// addition operators -- global friend functions. // addition operators -- global friend functions.
friend MYTYPE operator+<>(const MYTYPE& str1, const MYTYPE& str2); #if _MSC_VER < 1300 /* VC6, not VC7 */
friend MYTYPE operator+<>(const MYTYPE& str, CT t); /* work around another stupid vc6 bug */
friend MYTYPE operator+<>(const MYTYPE& str, PCSTR sz); #define EMP_TEMP
friend MYTYPE operator+<>(const MYTYPE& str, PCWSTR sz); #else
friend MYTYPE operator+<>(PCSTR pA, const MYTYPE& str); #define EMP_TEMP <>
friend MYTYPE operator+<>(PCWSTR pW, const MYTYPE& str); #endif
friend MYTYPE operator+ EMP_TEMP(const MYTYPE& str1, const MYTYPE& str2);
friend MYTYPE operator+ EMP_TEMP(const MYTYPE& str, CT t);
friend MYTYPE operator+ EMP_TEMP(const MYTYPE& str, PCSTR sz);
friend MYTYPE operator+ EMP_TEMP(const MYTYPE& str, PCWSTR sz);
friend MYTYPE operator+ EMP_TEMP(PCSTR pA, const MYTYPE& str);
friend MYTYPE operator+ EMP_TEMP(PCWSTR pW, const MYTYPE& str);
#ifdef SS_INC_COMDEF #ifdef SS_INC_COMDEF
friend MYTYPE operator+<>(const _bstr_t& bstr, const MYTYPE& str); friend MYTYPE operator+ EMP_TEMP(const _bstr_t& bstr, const MYTYPE& str);
friend MYTYPE operator+<>(const MYTYPE& str, const _bstr_t& bstr); friend MYTYPE operator+ EMP_TEMP(const MYTYPE& str, const _bstr_t& bstr);
#endif #endif
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------