\xtr1common(252) : error C2766: 显式专用化;

hujilin1229 2012-10-19 10:08:25
照着一个代码复制粘贴,弄了一个MFC,可是在编译的时候出现了这个错误,上网各种搜索,未果,只能来板上求助各位大神了,还望不吝赐教啊。具体错误如下:
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>”的前一个定义
...全文
1535 8 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
hujilin1229 2012-10-24
  • 打赏
  • 举报
回复
问题已解决,换了VS2012没有错误
hujilin1229 2012-10-20
  • 打赏
  • 举报
回复
有没有人遇到过这个问题啊,急求啊!!!
hujilin1229 2012-10-19
  • 打赏
  • 举报
回复
我的是一个大的程序,这个是在编译的时候就出错了,不知道错在哪啊
[Quote=引用 5 楼 的回复:]

把你错误的代码贴出来看看~
[/Quote]
Eleven 2012-10-19
  • 打赏
  • 举报
回复
把你错误的代码贴出来看看~
hujilin1229 2012-10-19
  • 打赏
  • 举报
回复

[Quote=引用 2 楼 的回复:]

BOOL 在MFC的某头文件中已被定义了(typedef BOOL int)。

参考下。
[/Quote]
我查找了整个解决方法,没查找到这句话啊
hujilin1229 2012-10-19
  • 打赏
  • 举报
回复

[Quote=引用 1 楼 的回复:]

贴上xtr1common 200行-252行的代码?貌似,stl库有问题
[/Quote]
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
};
Binzo 2012-10-19
  • 打赏
  • 举报
回复
BOOL 在MFC的某头文件中已被定义了(typedef BOOL int)。

参考下。
mujiok2003 2012-10-19
  • 打赏
  • 举报
回复
贴上xtr1common 200行-252行的代码?貌似,stl库有问题

65,203

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧