summaryrefslogtreecommitdiffstats
path: root/base/hash_tables.h
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-13 16:59:03 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-13 16:59:03 +0000
commitaff38a3e93fb5a63cd9eda1b2995996f16c713ac (patch)
tree0360db6f8999c3ad76a67ab30ad81f46f99d7883 /base/hash_tables.h
parentc6cb199d2d1d67af63d7227eff77e0a4163629fd (diff)
downloadchromium_src-aff38a3e93fb5a63cd9eda1b2995996f16c713ac.zip
chromium_src-aff38a3e93fb5a63cd9eda1b2995996f16c713ac.tar.gz
chromium_src-aff38a3e93fb5a63cd9eda1b2995996f16c713ac.tar.bz2
Disable gcc 4.4 warnings about hash_map and hash_set being
deprecated. backward_warning.h in gcc 4.4.0 wraps the warning around an ifdef __DEPRECATED. Review URL: http://codereview.chromium.org/67056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13599 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/hash_tables.h')
-rw-r--r--base/hash_tables.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/base/hash_tables.h b/base/hash_tables.h
index 2764956..5e50cfc 100644
--- a/base/hash_tables.h
+++ b/base/hash_tables.h
@@ -25,8 +25,22 @@ using stdext::hash_map;
using stdext::hash_set;
}
#elif defined(COMPILER_GCC)
+// This is a hack to disable the gcc 4.4 warning about hash_map and hash_set
+// being deprecated. We can get rid of this when we upgrade to VS2008 and we
+// can use <tr1/unordered_map> and <tr1/unordered_set>.
+#ifdef __DEPRECATED
+#define CHROME_OLD__DEPRECATED __DEPRECATED
+#undef __DEPRECATED
+#endif
+
#include <ext/hash_map>
#include <ext/hash_set>
+
+#ifdef CHROME_OLD__DEPRECATED
+#define __DEPRECATED CHROME_OLD__DEPRECATED
+#undef CHROME_OLD__DEPRECATED
+#endif
+
#include <tr1/functional>
namespace base {
using __gnu_cxx::hash_map;