当前位置: 技术问答>linux和unix
hash_map编译不过
来源: 互联网 发布时间:2017-04-06
本文导语: # if Cactus_COMP_VER >= 430 # define __HashMap ::std::tr1::unordered_map # define __HashSet ::std::tr1::unordered_set # define __HashCmp(x) ::std::tr1::hash # else # define __HashMap ::__gnu_cxx::hash_map # define __HashSet ::__gnu_cxx::hash_set # define __HashCmp(x) ::...
# if Cactus_COMP_VER >= 430
# define __HashMap ::std::tr1::unordered_map
# define __HashSet ::std::tr1::unordered_set
# define __HashCmp(x) ::std::tr1::hash
# else
# define __HashMap ::__gnu_cxx::hash_map
# define __HashSet ::__gnu_cxx::hash_set
# define __HashCmp(x) ::__gnu_cxx::hash
# endif
template
struct hashmap
{
#if Ogre_Container_Use_MemAlloc
typedef typename __HashMap type;
#else
typedef typename __HashMap type;
#endif
};
class DBCFileManager
{
typedef Cactus::hashmap::type KeyDBCFileMapType;
KeyDBCFileMapType _DBCFiles;
}
bool DBCFileManager::AddDBCFile(const Cactus::String& strKey, Cactus::DBCFile* pFile)
{
Safe;
if (_DBCFiles.find(strKey) != _DBCFiles.end()) //报错
return false;
Log_Debug("DBCManager::AddDBCFile, "
# define __HashMap ::std::tr1::unordered_map
# define __HashSet ::std::tr1::unordered_set
# define __HashCmp(x) ::std::tr1::hash
# else
# define __HashMap ::__gnu_cxx::hash_map
# define __HashSet ::__gnu_cxx::hash_set
# define __HashCmp(x) ::__gnu_cxx::hash
# endif
template
struct hashmap
{
#if Ogre_Container_Use_MemAlloc
typedef typename __HashMap type;
#else
typedef typename __HashMap type;
#endif
};
class DBCFileManager
{
typedef Cactus::hashmap::type KeyDBCFileMapType;
KeyDBCFileMapType _DBCFiles;
}
bool DBCFileManager::AddDBCFile(const Cactus::String& strKey, Cactus::DBCFile* pFile)
{
Safe;
if (_DBCFiles.find(strKey) != _DBCFiles.end()) //报错
return false;
Log_Debug("DBCManager::AddDBCFile, "