From fa2c7aa35c466cd27cedbddadf9ead3e181d4fbc Mon Sep 17 00:00:00 2001 From: "waterson%netscape.com" Date: Thu, 27 Apr 2000 06:37:06 +0000 Subject: [PATCH] Make the std::rel_ops namespace visible without qualification so that we can get operator!= from operator==, and operators >=, <=, and > from operator<. Needed for disambiguation with new string classes. r=scc --- xpcom/base/nscore.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xpcom/base/nscore.h b/xpcom/base/nscore.h index e451ef4f0de2..3b23b0760a97 100644 --- a/xpcom/base/nscore.h +++ b/xpcom/base/nscore.h @@ -202,6 +202,14 @@ typedef PRUint16 PRUnichar; #define HAVE_CPP_NAMESPACE_STD #define HAVE_CPP_UNAMBIGUOUS_STD_NOTEQUAL + // Other platforms declare standard implementations for operators + // !=, >, >=, and <= based on == and <. VC++ chooses to put these in + // a special namespace. We'll make it seem like they're *not* in a + // special namespace. + namespace std { namespace rel_ops {} } + using namespace std::rel_ops; + + /* VC++ is special and doesn't use naked min() and max() */ #undef NS_MIN #define NS_MIN std::_cpp_min