单项选择题

下列函数模板定义中,合法的是 A.
template  T  abs(T x){return x<0 ?-x :x ;} B.
template class  T  abs(T x){return x<0 ?-x :x ;}       C.
template     abs(T x){return x<0 ?-x :x ;}       D.
template  T  abs(T x){return x<0 ?-x :x ;}

微信扫码免费搜题