脑子赶不上烂笔头

查看gcc所有预定义宏
cpp -dM /dev/null

判断编译器类型的宏
#if defined(__GNUC__)
#endif

#if defined(_MSC_VER)
#endif

__gnu_cxx:hash_map
no match for call to `(const __gnu_cxx::hash<std::string>) (const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
错误解决方法

namespace __gnu_cxx {
    template<> struct hash< std::string > {
        size_t operator()(const std::string& key) const {
            return hash< const char* >()(key.c_str());
        }
    };
}

posted on 2011-07-19 10:01 Firebrick 阅读(151) 评论(0)  编辑 收藏 引用


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理


导航

<2011年7月>
262728293012
3456789
10111213141516
17181920212223
24252627282930
31123456

统计

常用链接

留言簿

随笔档案

最新评论