* src/tgba/state.hh (state_ptr_less_than, state_ptr_equal):
Declare as std::binary_function. (state_ptr_hash): Declare as std::unary_function. * src/tgbaalgos/lbtt.cc (state_acc_pair_equal, state_acc_pair_hash): Likewise. * src/misc/bddlt.hh (bdd_less_than): Likewise. * src/misc/hash.hh (ptr_hash, string_hash): Likewise.
This commit is contained in:
parent
7f3c113130
commit
2e97e6447b
5 changed files with 37 additions and 18 deletions
|
|
@ -2,6 +2,7 @@
|
|||
# define SPOT_MISC_HASH_HH
|
||||
|
||||
# include <string>
|
||||
# include <functional>
|
||||
|
||||
// See the G++ FAQ for details about the following.
|
||||
# ifdef __GNUC__
|
||||
|
|
@ -34,7 +35,8 @@ namespace spot
|
|||
|
||||
/// A hash function for pointers.
|
||||
template <class T>
|
||||
struct ptr_hash
|
||||
struct ptr_hash :
|
||||
public std::unary_function<const T*, size_t>
|
||||
{
|
||||
size_t operator()(const T* p) const
|
||||
{
|
||||
|
|
@ -43,7 +45,9 @@ namespace spot
|
|||
};
|
||||
|
||||
/// A hash function for strings.
|
||||
struct string_hash : Sgi::hash<const char*>
|
||||
struct string_hash :
|
||||
public Sgi::hash<const char*>,
|
||||
public std::unary_function<const std::string&, size_t>
|
||||
{
|
||||
size_t operator()(const std::string& s) const
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue