Commit b39e68c5 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

Fix a compilation failure with g++-3.3.

* src/misc/hash.hh (identity_hash): New function.
* src/tgba/tgbaexplicit.hh (tgba_explicit_number): Use
identity_hash<int> instead of std::tr1::hash<int> that does not
exist with g++-3.3.
parent 74f14567
2011-01-12 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Fix a compilation failure with g++-3.3.
* src/misc/hash.hh (identity_hash): New function.
* src/tgba/tgbaexplicit.hh (tgba_explicit_number): Use
identity_hash<int> instead of std::tr1::hash<int> that does not
exist with g++-3.3.
2011-01-07 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Fix usage of minimize_obligation in the CGI script.
......
// Copyright (C) 2008 Laboratoire de Recherche et Développement
// Copyright (C) 2008, 2011 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
// Copyright (C) 2003, 2004, 2005 Laboratoire d'Informatique de
// Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
......@@ -86,7 +86,7 @@ namespace spot
# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4
typedef std::tr1::hash<std::string> string_hash;
# else // GCC < 4.3
struct string_hash :
struct string_hash:
public Sgi::hash<const char*>,
public std::unary_function<const std::string&, size_t>
{
......@@ -99,6 +99,18 @@ namespace spot
};
/// @}
# endif
/// \brief A hash function that returns identity
/// \ingroup hash_funcs
template<typename T>
struct identity_hash:
public std::unary_function<const T&, size_t>
{
size_t operator()(const T& s) const
{
return s;
}
};
}
#endif // SPOT_MISC_HASH_HH
......@@ -360,11 +360,11 @@ namespace spot
#ifndef SWIG
class tgba_explicit_number:
public tgba_explicit_labelled<int, std::tr1::hash<int> >
public tgba_explicit_labelled<int, identity_hash<int> >
{
public:
tgba_explicit_number(bdd_dict* dict):
tgba_explicit_labelled<int, std::tr1::hash<int> >(dict)
tgba_explicit_labelled<int, identity_hash<int> >(dict)
{};
virtual ~tgba_explicit_number();
virtual state* add_default_init();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment