diff --git a/src/misc/hash.hh b/src/misc/hash.hh index 53dc285d0..700c8a583 100644 --- a/src/misc/hash.hh +++ b/src/misc/hash.hh @@ -1,8 +1,9 @@ -// Copyright (C) 2008, 2011 Laboratoire de Recherche et Développement -// de l'Epita (LRDE). +// -*- coding: utf-8 -*- +// Copyright (C) 2008, 2011, 2014 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), -// Université Pierre et Marie Curie. +// Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC), +// Université Pierre et Marie Curie. // // This file is part of Spot, a model checking library. // @@ -80,6 +81,13 @@ namespace spot struct ptr_hash : public std::unary_function { + // A default constructor is needed if the ptr_hash object is + // stored in a const member. This occur with the clang version + // installed by OS X 10.9. + ptr_hash() + { + } + size_t operator()(const T* p) const { return knuth32_hash(reinterpret_cast(p) @@ -97,6 +105,12 @@ namespace spot public Sgi::hash, public std::unary_function { + // 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() @@ -113,6 +127,12 @@ namespace spot struct identity_hash: public std::unary_function { + // A default constructor is needed if the string_hash object is + // stored in a const member. + identity_hash() + { + } + size_t operator()(const T& s) const { return s;