什么编译器支持成员函数模板偏特化
发信人: RoachCock (穷鬼), 信区: Programming
标 题: 什么编译器支持成员函数模板偏特化
发信站: BBS 水木清华站 (Fri Jan 25 22:04:12 2002)
以下这段代码,VC6,BCB5都不能编译通过
template<class T>
struct member_function_traits
{
};
template<class RT, class OT>
struct member_function_traits< RT (OT::*)() >
{
typedef OT object_type;
typedef RT result_type;
};
template<class RT, class OT, class AT>
struct member_function_traits< RT (OT::*)(AT) ) >
{
typedef OT object_type;
typedef RT result_type;
typedef AT argument_type;
typedef AT first_argument_type;
};
template<class RT,class OT,class AT1,class AT2>
struct member_function_traits< RT (OT::*)(AT1,AT2) >
{
typedef OT object_type;
typedef RT result_type;
typedef AT1 first_argument_type;
typedef AT2 second_argument_type;
};
--
要钱没有,要命也没有