#ifndef FLEX_STRING_HASH_INC_ #define FLEX_STRING_HASH_INC_ #include #include "flex_string.h" #if defined(_STLP_BEGIN_NAMESPACE) _STLP_BEGIN_NAMESPACE /** http://www.stlport.org implementation. */ template struct hash< flex_string > { size_t operator()( const flex_string& str ) const { return hash< const char* >()( str.c_str() ); } }; _STLP_END_NAMESPACE #else if defined(_STDEXT_BEGIN) && defined(_MSC_VER) && _MSC_VER >= 1300 _STDEXT_BEGIN /** Microsoft hash_map. */ template inline size_t hash_value(const flex_string& str) { // hash string to size_t value //call the MS default hash function for this string. return hash_value(str.c_str()); } _STDEXT_END #endif #endif //#ifndef FLEX_STRING_HASH_INC_