X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Fmathml_editor%2Fsrc%2FTDictionary.hh;h=4864630f969cf0c36bb117a7a5855300aead6de2;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=8807f83772e0e2076a86079b9d1ca12875ea25bc;hpb=84877da90dd68c88915b5ee54d31e9849f340eac;p=helm.git diff --git a/helm/DEVEL/mathml_editor/src/TDictionary.hh b/helm/DEVEL/mathml_editor/src/TDictionary.hh index 8807f8377..4864630f9 100644 --- a/helm/DEVEL/mathml_editor/src/TDictionary.hh +++ b/helm/DEVEL/mathml_editor/src/TDictionary.hh @@ -30,7 +30,13 @@ #include #include +#if defined(HAVE_EXT_HASH_MAP) +#include +#elif defined(HAVE_HASH_MAP) #include +#else +#error "no hash_map could be found" +#endif #include #include "dom.hh" @@ -93,8 +99,15 @@ public: std::string complete(const std::string, std::list&) const; private: +#if defined(HAVE_EXT_HASH_MAP) + struct StringHash : public std::unary_function< std::string, size_t > + { size_t operator()(const std::string& s) const { return __gnu_cxx::hash()(s.c_str()); } }; +#elif defined(HAVE_HASH_MAP) struct StringHash : public std::unary_function< std::string, size_t > { size_t operator()(const std::string& s) const { return hash()(s.c_str()); } }; +#else +#error "no hash_map could be found" +#endif #if 0 struct StringEq : public std::binary_function< std::string, std::string, bool >