[nemiver] Fix build with gcc 4.1.2 (Closes: #572704)
- From: Dodji Seketeli <dodji src gnome org>
- To: svn-commits-list gnome org
- Subject: [nemiver] Fix build with gcc 4.1.2 (Closes: #572704)
- Date: Thu, 12 Mar 2009 08:20:44 -0400 (EDT)
commit 00d0c925a5789778dbc8999a27cdbdbfdb106a27
Author: Hans Vercammen <hveso3 gmail com>
Date: Thu Mar 12 13:16:59 2009 +0100
Fix build with gcc 4.1.2 (Closes: #572704)
* src/common/nmv-log-stream.cc: Add a hash functor for std::string
to be used with ext/hash_map.
---
src/common/nmv-log-stream.cc | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/common/nmv-log-stream.cc b/src/common/nmv-log-stream.cc
index 8bcd74a..0dc4647 100644
--- a/src/common/nmv-log-stream.cc
+++ b/src/common/nmv-log-stream.cc
@@ -46,6 +46,16 @@
#include <tr1/unordered_map>
#else
#include <ext/hash_map>
+
+namespace __gnu_cxx {
+ template<>
+ struct hash<std::string> {
+ size_t operator() (const std::string& s) const
+ {
+ return hash<const char*>() (s.c_str ());
+ }
+ };
+}
#endif
namespace nemiver {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]