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.
This commit is contained in:
parent
74f14567d1
commit
b39e68c51e
3 changed files with 25 additions and 4 deletions
|
|
@ -1,3 +1,12 @@
|
||||||
|
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>
|
2011-01-07 Alexandre Duret-Lutz <adl@lrde.epita.fr>
|
||||||
|
|
||||||
Fix usage of minimize_obligation in the CGI script.
|
Fix usage of minimize_obligation in the CGI script.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// Copyright (C) 2008 Laboratoire de Recherche et Développement
|
// Copyright (C) 2008, 2011 Laboratoire de Recherche et Développement
|
||||||
// de l'Epita (LRDE).
|
// de l'Epita (LRDE).
|
||||||
// Copyright (C) 2003, 2004, 2005 Laboratoire d'Informatique de
|
// Copyright (C) 2003, 2004, 2005 Laboratoire d'Informatique de
|
||||||
// Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
// 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
|
# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4
|
||||||
typedef std::tr1::hash<std::string> string_hash;
|
typedef std::tr1::hash<std::string> string_hash;
|
||||||
# else // GCC < 4.3
|
# else // GCC < 4.3
|
||||||
struct string_hash :
|
struct string_hash:
|
||||||
public Sgi::hash<const char*>,
|
public Sgi::hash<const char*>,
|
||||||
public std::unary_function<const std::string&, size_t>
|
public std::unary_function<const std::string&, size_t>
|
||||||
{
|
{
|
||||||
|
|
@ -99,6 +99,18 @@ namespace spot
|
||||||
};
|
};
|
||||||
/// @}
|
/// @}
|
||||||
# endif
|
# 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
|
#endif // SPOT_MISC_HASH_HH
|
||||||
|
|
|
||||||
|
|
@ -360,11 +360,11 @@ namespace spot
|
||||||
|
|
||||||
#ifndef SWIG
|
#ifndef SWIG
|
||||||
class tgba_explicit_number:
|
class tgba_explicit_number:
|
||||||
public tgba_explicit_labelled<int, std::tr1::hash<int> >
|
public tgba_explicit_labelled<int, identity_hash<int> >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
tgba_explicit_number(bdd_dict* dict):
|
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 ~tgba_explicit_number();
|
||||||
virtual state* add_default_init();
|
virtual state* add_default_init();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue