码迷,mamicode.com
首页 > 其他好文 > 详细

以下代码VC6编译不过,VC8能过

时间:2015-01-28 09:42:26      阅读:132      评论:0      收藏:0      [点我收藏+]

标签:

以下代码VC6编译不过,不知道fun(m1)调用那个函数,VC8能过。


#include <iostream>

#include <string>
#include <map>

using namespace std ;


void fun(int x)
    {
        
    }

template<class _K, class _Ty>
        void fun(std::map<_K,_Ty>& m)
    {
        
    }

    template<class TYPE>
    void fun(TYPE x)
    {
        
    }
 
    class A
    {
    };


    void main()
    {
        std::map<long, A> m1;
        fun(3);
        fun("dd");
        fun(m1);
    }


以下代码VC6编译不过,VC8能过

标签:

原文地址:http://blog.csdn.net/he_zhidan/article/details/43225945

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!