hash.hh: Remove conditional code.

* m4/stl.m4: Delete.
* configure.ac: Do not check for unordered_map and friends.
* src/misc/hash.hh: Remove all conditional code.
This commit is contained in:
Alexandre Duret-Lutz 2013-12-15 22:38:35 +01:00
parent f3874e05cc
commit c568b4d337
3 changed files with 0 additions and 118 deletions

View file

@ -28,49 +28,12 @@
# include "misc/hashfunc.hh"
# include "misc/_config.h"
#ifdef SPOT_HAVE_UNORDERED_MAP
# include <unordered_map>
# include <unordered_set>
namespace Sgi = std;
# define hash_map unordered_map
# define hash_multimap unordered_multimap
# define hash_set unordered_set
#else
#ifdef SPOT_HAVE_TR1_UNORDERED_MAP
# include <tr1/unordered_map>
# include <tr1/unordered_set>
namespace Sgi = std::tr1;
# define hash_map unordered_map
# define hash_multimap unordered_multimap
# define hash_set unordered_set
#else
#ifdef SPOT_HAVE_EXT_HASH_MAP
# include <ext/hash_map>
# include <ext/hash_set>
# if __GNUC__ == 3 && __GNUC_MINOR__ == 0
namespace Sgi = std; // GCC 3.0
# else
namespace Sgi = ::__gnu_cxx; // GCC 3.1 to 4.2
# endif
#else
# if defined(__GNUC__) && (__GNUC__ < 3)
# include <hash_map.h>
# include <hash_set.h>
namespace Sgi
{ // inherit globals
using ::hash_map;
using ::hash_multimap;
using ::hash_set;
using ::hash;
}
# else
# include <hash_map>
# include <hash_set>
namespace Sgi = std;
# endif
#endif
#endif
#endif
namespace spot
{
@ -97,29 +60,7 @@ namespace spot
/// \ingroup hash_funcs
/// \brief A hash function for strings.
/// @{
#if defined(SPOT_HAVE_UNORDERED_MAP) || defined(SPOT_HAVE_TR1_UNORDERED_MAP)
typedef Sgi::hash<std::string> string_hash;
#else // e.g. GCC < 4.3
struct string_hash:
public Sgi::hash<const char*>,
public std::unary_function<const std::string&, size_t>
{
// A default constructor is needed if the string_hash object is
// stored in a const member.
string_hash()
{
}
size_t operator()(const std::string& s) const
{
// We are living dangerously. Be sure to call operator()
// from the super-class, not this one.
return Sgi::hash<const char*>::operator()(s.c_str());
}
};
/// @}
#endif
/// \ingroup hash_funcs
/// \brief A hash function that returns identity