1>G:\Program Files\Microsoft Visual Studio 9.0\VC\include\xtr1common(252) : error C2766: 显式专用化;已定义“std::tr1::_Is_integral<BOOL>”
1> G:\Program Files\Microsoft Visual Studio 9.0\VC\include\xtr1common(200) : 参见“_Is_integral<int>”的前一个定义
8 个解决方案
#1
贴上xtr1common 200行-252行的代码?貌似,stl库有问题
#2
BOOL 在MFC的某头文件中已被定义了(typedef BOOL int)。
参考下。
参考下。
#3
template<>
struct _Is_integral<bool>
: true_type
{ // determine whether _Ty is integral
};
template<>
struct _Is_integral<char>
: true_type
{ // determine whether _Ty is integral
};
template<>
struct _Is_integral<unsigned char>
: true_type
{ // determine whether _Ty is integral
};
template<>
struct _Is_integral<signed char>
: true_type
{ // determine whether _Ty is integral
};
#ifdef _NATIVE_WCHAR_T_DEFINED
template<>
struct _Is_integral<wchar_t>
: true_type
{ // determine whether _Ty is integral
};
#endif /* _NATIVE_WCHAR_T_DEFINED */
template<>
struct _Is_integral<unsigned short>
: true_type
{ // determine whether _Ty is integral
};
template<>
struct _Is_integral<signed short>
: true_type
{ // determine whether _Ty is integral
};
template<>
struct _Is_integral<unsigned int>
: true_type
{ // determine whether _Ty is integral
};
template<>
struct _Is_integral<signed int>
: true_type
{ // determine whether _Ty is integral
};
#4
我查找了整个解决方法,没查找到这句话啊
#5
把你错误的代码贴出来看看~
#6
我的是一个大的程序,这个是在编译的时候就出错了,不知道错在哪啊
#7
有没有人遇到过这个问题啊,急求啊!!!
#8
问题已解决,换了VS2012没有错误
#1
贴上xtr1common 200行-252行的代码?貌似,stl库有问题
#2
BOOL 在MFC的某头文件中已被定义了(typedef BOOL int)。
参考下。
参考下。
#3
template<>
struct _Is_integral<bool>
: true_type
{ // determine whether _Ty is integral
};
template<>
struct _Is_integral<char>
: true_type
{ // determine whether _Ty is integral
};
template<>
struct _Is_integral<unsigned char>
: true_type
{ // determine whether _Ty is integral
};
template<>
struct _Is_integral<signed char>
: true_type
{ // determine whether _Ty is integral
};
#ifdef _NATIVE_WCHAR_T_DEFINED
template<>
struct _Is_integral<wchar_t>
: true_type
{ // determine whether _Ty is integral
};
#endif /* _NATIVE_WCHAR_T_DEFINED */
template<>
struct _Is_integral<unsigned short>
: true_type
{ // determine whether _Ty is integral
};
template<>
struct _Is_integral<signed short>
: true_type
{ // determine whether _Ty is integral
};
template<>
struct _Is_integral<unsigned int>
: true_type
{ // determine whether _Ty is integral
};
template<>
struct _Is_integral<signed int>
: true_type
{ // determine whether _Ty is integral
};
#4
我查找了整个解决方法,没查找到这句话啊
#5
把你错误的代码贴出来看看~
#6
我的是一个大的程序,这个是在编译的时候就出错了,不知道错在哪啊
#7
有没有人遇到过这个问题啊,急求啊!!!
#8
问题已解决,换了VS2012没有错误