[complement-svn] SF.net SVN: complement:[1966] trunk/complement/explore/include
Status: Pre-Alpha
Brought to you by:
complement
|
From: <com...@us...> - 2008-09-08 19:59:01
|
Revision: 1966
http://complement.svn.sourceforge.net/complement/?rev=1966&view=rev
Author: complement
Date: 2008-09-08 19:58:50 +0000 (Mon, 08 Sep 2008)
Log Message:
-----------
use only one definition of hash<void*>
When compile without STLport bu gcc before 4.x, hash<void*>
should be defined, but only once.
Modified Paths:
--------------
trunk/complement/explore/include/sockios/sockmgr.h
trunk/complement/explore/include/stem/Event.h
Modified: trunk/complement/explore/include/sockios/sockmgr.h
===================================================================
--- trunk/complement/explore/include/sockios/sockmgr.h 2008-09-08 19:57:49 UTC (rev 1965)
+++ trunk/complement/explore/include/sockios/sockmgr.h 2008-09-08 19:58:50 UTC (rev 1966)
@@ -1,4 +1,4 @@
-// -*- C++ -*- Time-stamp: <08/06/27 00:50:33 ptr>
+// -*- C++ -*- Time-stamp: <08/09/08 23:18:28 ptr>
/*
* Copyright (c) 2008
@@ -319,13 +319,16 @@
}
#endif
-#if defined(__GNUC__) && (__GNUC__ < 4)
+#if defined(__GNUC__) && (__GNUC__ < 4) && !defined(HASH_VOID_PTR_DEFINED)
template<>
struct hash<void *>
{
size_t operator()(const void *__x) const
{ return reinterpret_cast<size_t>(__x); }
};
+
+#define HASH_VOID_PTR_DEFINED
+
#endif // __GNUC__ < 4
} // namespace __HASH_NAMESPACE
Modified: trunk/complement/explore/include/stem/Event.h
===================================================================
--- trunk/complement/explore/include/stem/Event.h 2008-09-08 19:57:49 UTC (rev 1965)
+++ trunk/complement/explore/include/stem/Event.h 2008-09-08 19:58:50 UTC (rev 1966)
@@ -1,4 +1,4 @@
-// -*- C++ -*- Time-stamp: <08/06/30 18:14:16 yeti>
+// -*- C++ -*- Time-stamp: <08/09/08 23:18:05 ptr>
/*
*
@@ -664,13 +664,16 @@
}
#endif
-#if defined(__GNUC__) && (__GNUC__ < 4)
+#if defined(__GNUC__) && (__GNUC__ < 4) && !defined(HASH_VOID_PTR_DEFINED)
template<>
struct hash<void *>
{
size_t operator()(const void *__x) const
{ return reinterpret_cast<size_t>(__x); }
};
+
+#define HASH_VOID_PTR_DEFINED
+
#endif // __GNUC__ < 4
} // namespace __HASH_NAMESPACE
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|