首页 > 其他 > 详细

UnSignType

时间:2015-02-05 13:41:37      阅读:215      评论:0      收藏:0      [点我收藏+]
template<class T>
class UnSignType
{
    //如果缺少Type 请用UNSIGN_TYPE宏添加偏特化
};

#define UNSIGN_TYPE(t) \
template<> \
struct UnSignType<t> \
{\
    typedef  unsigned t TYPE;\
};

UNSIGN_TYPE(char)
UNSIGN_TYPE(short)
UNSIGN_TYPE(int)
UNSIGN_TYPE(long)
UNSIGN_TYPE(__int64)


//测试程序

void main()
{
    UnSignType<int>::TYPE c;
}

UnSignType

原文:http://blog.csdn.net/he_zhidan/article/details/43525925

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!