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

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

以下代码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);
    }
-------------------------------
template<class T>
void Fun(T t1,T t2 )
{
}
template<class T1,class T2 >
int Fun(T1 t1,T2 t2)
{
    return 0 ;
}
void main()
{
    int x1 = Fun((short)1,(long)1);
}


VS2005(VS8)能过 VS2002(VC7)不能过。


相关文章
|
7月前
|
IDE 编译器 Go
VC调试方法大全
VC调试方法大全
33 0
VC7(VS2002)的arx项目转VC8(VS2005)项目,注意事项
VC7(VS2002)的arx项目转VC8(VS2005)项目,注意事项
|
芯片 C++
【MDK(keil)编译错误】找不到main.o及解决方法、多处报错“未定义”
【MDK(keil)编译错误】找不到main.o及解决方法、多处报错“未定义”
703 0
【MDK(keil)编译错误】找不到main.o及解决方法、多处报错“未定义”
|
IDE 程序员 编译器
VC调试方法
VC调试方法
107 0