2009年4月18日

很久以前发现的 vc2008 的一个bug(关于模板匹配)

摘要: 使用操作符重载时,出现模板匹配错误,bug 的出现很简单,下面是代码:#include #include struct A1{ template void operator& x) { printf("void operator& x)/n"); }};struct A2{ void operator void operator void operator<<(T& x) { printf("void operator<<(T& x)/n"); }};int main(int argc, char* 阅读全文

posted @ 2009-04-18 23:44 能发波 阅读(175) 评论(0) 推荐(0)

vc2008 比 gcc4.3 真是差太多了

摘要: 项目地址:http://code.google.com/p/febird用gcc4.3重新编译了一下febird,出现了很多错误,仔细观察,这些错误都是因为不符合C++标准,重新改成符合标准的,比想象的改动量要大。又测试了一下纯 C 实现的 algorithm: febird.c,是从VC2008的stl代码改过来的,在VC2008中测试比std::sort快20%,但是一到gcc中,却比std::sort慢了一倍还不止!不知到dinkware怎么写的。他有没有和sgi的比较过。重新研读了一下 gcc4.3 的 algorithm代码,gcc.stl.sort把insertion_sort放到 阅读全文

posted @ 2009-04-18 23:25 能发波 阅读(109) 评论(0) 推荐(0)

导航