2011年7月19日

查看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 @ 2011-07-19 10:01 Firebrick 阅读(151) | 评论 (0)编辑 收藏
仅列出标题  

导航

<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

统计

常用链接

留言簿

随笔档案

最新评论