类成员函数模板特化
//類成員函數(shù)模板特化
#include <stdio.h>
class A{
public:template <class T>void Print(){printf("A template\n");}
};template<>
void A::Print<int>(){printf("int\n");
}int main(){A a;a.Print<double>();a.Print<int>();return 0;
}
?
轉(zhuǎn)載于:https://www.cnblogs.com/zzyoucan/p/6129669.html
總結(jié)
- 上一篇: 如何在 IIS 中设置 HTTPS 服务
- 下一篇: 20145202马超《信息安全系统设计基