Article ID: 166721
Article Last Modified on 7/5/2005
#if (_MSC_VER == 1100)
#define GLOBAL_OPS(Type) \
bool operator < (const Type& lhs, const Type& rhs);
bool operator == (const Type& lhs, const Type& rhs);
GLOBAL_OPS(MyClass)
GLOBAL_OPS(MyOtherClass)
#endif
170365 INFO: Visual Studio 97 Service Packs - What, Where, and Why
/*
Compile options needed to reproduce: -GX
Compile options needed for workaround: -GX -D"WORKAROUND"
*/
#include <vector>
using namespace std;
struct MyClass {
// members here
};
struct MyOtherClass {
// members here
};
#ifdef WORKAROUND
#if (_MSC_VER == 1100)
#define GLOBAL_OPS(Type) \
bool operator < (const Type& lhs, const Type& rhs) {return true;} \
bool operator == (const Type& lhs, const Type& rhs) {return true;}
GLOBAL_OPS(MyClass)
GLOBAL_OPS(MyOtherClass)
#endif //_MSC_VER
#endif //WORKAROUND
void main () {
vector<MyClass> a;
}
Keywords: kbbug kbfix kblangcpp kbvs97sp1fix kbcpponly kbcode kbcompiler KB166721