#include <iostream>
template<class T>
struct Widget{
void Func() {
std::cout<<"generic func"<<std::endl;
}
};
template<>
void Widget<char>::Func(){
std::cout<<"spectial"<<std::endl;
}
void Test(){
Widget<int> w;
w.Func();
Widget<char> c;
c.Func();
}
template<class T, class U>
struct Target{
void Func(){
std::cout<<"generic func"<<std::endl;
}
};
template<class T>
void Target<T, int>::Func(){
std::cout<<"spectial"<<std::endl;
}
template <typename A>
void f(A a) {
std::cout << "Normal version." << std::endl;
}
template <>
void f<int>(int a) {
std::cout << "Partial version." << std::endl;
}
int main() {
Test();
return 0;
}