C++重载的时候会优先匹配非模块函数
摘要:
发现当重载函数足够多的时候,出现可以符合非模块函数,及模块函数都可匹配的时候,GCC好像会优先匹配非模块函数.见下面代码#include <iostream>#include <vector>#include <string>#include <limits>using namespace std;int max(const int n1, const int n2){ return n1 > n2 ? n1 : n2;}float max( const float f1, const float f2){ return f1 > f 阅读全文
posted @ 2012-12-15 19:19 Orz.. 阅读(536) 评论(0) 推荐(0)
浙公网安备 33010602011771号