问题 单项选择题

下列函数模板的定义中,合法的是

A.templateT abs(T x){return x<0? -X:x;)

B.template classT abs(T x){return x

C.template Tabs(T x)(return x

D.template T abs{return x<0 -x:xI)

答案

参考答案:A

解答题
单项选择题 B型题