怎样判断两个变量数据类型一致

来源:互联网 发布:python sap 编辑:程序博客网 时间:2024/04/30 10:31


int same_type(const T1& t1,const T2& t2){ return 0;}template <class T>int same_type(const T& t1,const T& t2){ return 1;}
模板真是个好东西啊,用起来就爽!

0 0
原创粉丝点击